From: <mk...@us...> - 2003-10-10 05:41:32
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv32317/Source Modified Files: Tag: systems Makefile.in Added Files: Tag: systems SystemsModel.cpp Log Message: --- NEW FILE: SystemsModel.cpp --- // Combat Simulator Project - FlightSim Demo // Copyright (C) 2003 The Combat Simulator Project // http://csp.sourceforge.net // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** * @file SystemsModel.cpp * * Vehicle systems base classes and infrastructure. * **/ #include <SystemsModel.h> #include <DataRecorder.h> SIMDATA_REGISTER_INTERFACE(SystemsModel) void SystemsModel::setDataRecorder(DataRecorder *recorder) { if (!recorder) return; // TODO pass recorder to subsystems } simdata::Ref<PhysicsModel> SystemsModel::getPhysicsModel() const { return m_PhysicsModel; } simdata::Ref<Controller> SystemsModel::getController() const { return m_Controller; } void SystemsModel::postCreate() { System::postCreate(); if (m_PhysicsModel.valid()) { CSP_LOG(OBJECT, DEBUG, "Adding PhysicsModel (" << m_PhysicsModel->getClassName() << ")"); addChild(m_PhysicsModel.get()); } if (m_Controller.valid()) { CSP_LOG(OBJECT, DEBUG, "Adding Controller (" << m_Controller->getClassName() << ")"); addChild(m_Controller.get()); } } void SystemsModel::serialize(simdata::Archive &archive) { System::serialize(archive); archive(m_PhysicsModel); // XXX temporarily disabled (no controller classes yet) //archive(m_Controller); } void SystemsModel::getInfo(InfoList &info) { accept(new InfoVisitor(info)); } Index: Makefile.in =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Makefile.in,v retrieving revision 1.20.2.5 retrieving revision 1.20.2.6 diff -C2 -d -r1.20.2.5 -r1.20.2.6 *** Makefile.in 9 Oct 2003 23:40:41 -0000 1.20.2.5 --- Makefile.in 10 Oct 2003 05:41:28 -0000 1.20.2.6 *************** *** 70,73 **** --- 70,74 ---- SynchronousUpdate.cpp \ System.cpp \ + SystemsModel.cpp \ TankObject.cpp \ TerrainObject.cpp \ |