From: <mk...@us...> - 2003-10-20 01:35:37
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv26115/Source Modified Files: AircraftObject.cpp FlightDynamics.cpp SynchronousUpdate.cpp SystemsModel.cpp Log Message: Index: AircraftObject.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/AircraftObject.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** AircraftObject.cpp 20 Oct 2003 00:23:23 -0000 1.32 --- AircraftObject.cpp 20 Oct 2003 01:27:10 -0000 1.33 *************** *** 40,47 **** - #ifdef _WIN32 - #define snprintf _snprintf - #endif - SIMDATA_REGISTER_INTERFACE(AircraftObject) --- 40,43 ---- Index: FlightDynamics.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/FlightDynamics.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FlightDynamics.cpp 20 Oct 2003 00:23:23 -0000 1.5 --- FlightDynamics.cpp 20 Oct 2003 01:27:10 -0000 1.6 *************** *** 122,126 **** } ! void FlightDynamics::getInfo(InfoList &info) { std::stringstream line; line.setf(std::ios::fixed | std::ios::showpos); --- 122,126 ---- } ! void FlightDynamics::getInfo(InfoList &info) const { std::stringstream line; line.setf(std::ios::fixed | std::ios::showpos); Index: SynchronousUpdate.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SynchronousUpdate.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SynchronousUpdate.cpp 16 Sep 2003 03:34:51 -0000 1.1 --- SynchronousUpdate.cpp 20 Oct 2003 01:27:10 -0000 1.2 *************** *** 61,65 **** if (!m_ShortList.empty()) { UpdateList::iterator iter = m_ShortList.begin(); ! UpdateList::iterator end = m_ShortList.begin(); UpdateList::iterator remove; while (iter != end) { --- 61,65 ---- if (!m_ShortList.empty()) { UpdateList::iterator iter = m_ShortList.begin(); ! UpdateList::iterator end = m_ShortList.end(); UpdateList::iterator remove; while (iter != end) { *************** *** 110,113 **** --- 110,116 ---- } + void UpdateTarget::detachUpdateProxy() { + m_UpdateProxy = 0; + } void UpdateTarget::registerUpdate(UpdateMaster *master) { *************** *** 115,118 **** --- 118,122 ---- if (m_UpdateProxy.valid()) m_UpdateProxy->targetSelfDetach(); m_UpdateProxy = master->registerUpdate(this); + std::cout << "REGISTERING UPDATE WITH MASTER\n"; } } *************** *** 122,124 **** --- 126,133 ---- } + + UpdateMaster *UpdateTarget::getMaster() const { + if (!m_UpdateProxy) return 0; + return m_UpdateProxy->getMaster(); + } Index: SystemsModel.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SystemsModel.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SystemsModel.cpp 20 Oct 2003 00:23:23 -0000 1.2 --- SystemsModel.cpp 20 Oct 2003 01:27:10 -0000 1.3 *************** *** 32,39 **** SIMDATA_REGISTER_INTERFACE(SystemsModel) void SystemsModel::setDataRecorder(DataRecorder *recorder) { if (!recorder) return; ! // TODO pass recorder to subsystems } --- 32,49 ---- SIMDATA_REGISTER_INTERFACE(SystemsModel) + class BindRecorderVisitor: public SystemVisitor { + DataRecorder *m_Recorder; + public: + BindRecorderVisitor(DataRecorder *recorder): m_Recorder(recorder) {} + void apply(System &system) { + system.bindRecorder(m_Recorder); + traverse(system); + } + void apply(SystemsModel &model) { traverse(model); } + }; void SystemsModel::setDataRecorder(DataRecorder *recorder) { if (!recorder) return; ! accept(new BindRecorderVisitor(recorder)); } |