BlueprintInstance.h

Go to the documentation of this file.
00001 /*************************************************************************
00002 *                                                                       *
00003 * Open Physics Abstraction Layer                                        *
00004 * Copyright (C) 2004-2005                                               *
00005 * Alan Fischer  alan.fischer@gmail.com                                  *
00006 * Andres Reinot  andres@reinot.com                                      *
00007 * Tyler Streeter  tylerstreeter@gmail.com                               *
00008 * All rights reserved.                                                  *
00009 * Web: opal.sourceforge.net                                             *
00010 *                                                                       *
00011 * This library is free software; you can redistribute it and/or         *
00012 * modify it under the terms of EITHER:                                  *
00013 *   (1) The GNU Lesser General Public License as published by the Free  *
00014 *       Software Foundation; either version 2.1 of the License, or (at  *
00015 *       your option) any later version. The text of the GNU Lesser      *
00016 *       General Public License is included with this library in the     *
00017 *       file license-LGPL.txt.                                          *
00018 *   (2) The BSD-style license that is included with this library in     *
00019 *       the file license-BSD.txt.                                       *
00020 *                                                                       *
00021 * This library is distributed in the hope that it will be useful,       *
00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00024 * license-LGPL.txt and license-BSD.txt for more details.                *
00025 *                                                                       *
00026 *************************************************************************/
00027 
00028 #ifndef OPAL_BLUEPRINT_INSTANCE_H
00029 #define OPAL_BLUEPRINT_INSTANCE_H
00030 
00031 #include "Defines.h"
00032 
00033 namespace opal
00034 {
00035     class Solid;
00036     class Joint;
00037     class Motor;
00038     class Sensor;
00039 
00045     class BlueprintInstance
00046     {
00047         public:
00048             OPAL_DECL BlueprintInstance();
00049 
00050             OPAL_DECL virtual ~BlueprintInstance();
00051 
00054             OPAL_DECL virtual Solid* OPAL_CALL getSolid(
00055                 const std::string& name ) const;
00056 
00059             OPAL_DECL virtual Joint* OPAL_CALL getJoint(
00060                 const std::string& name ) const;
00061 
00064             OPAL_DECL virtual Motor* OPAL_CALL getMotor(
00065                 const std::string& name ) const;
00066 
00069             OPAL_DECL virtual Sensor* OPAL_CALL getSensor(
00070                 const std::string& name ) const;
00071 
00073             OPAL_DECL virtual unsigned int OPAL_CALL getNumSolids() const;
00074 
00076             OPAL_DECL virtual unsigned int OPAL_CALL getNumJoints() const;
00077 
00079             OPAL_DECL virtual unsigned int OPAL_CALL getNumMotors() const;
00080 
00082             OPAL_DECL virtual unsigned int OPAL_CALL getNumSensors() const;
00083 
00085 
00088             OPAL_DECL virtual Solid * OPAL_CALL getSolid( unsigned int i ) const;
00089 
00091 
00094             OPAL_DECL virtual Joint * OPAL_CALL getJoint( unsigned int i ) const;
00095 
00097 
00100             OPAL_DECL virtual Motor * OPAL_CALL getMotor( unsigned int i ) const;
00101 
00103 
00106             OPAL_DECL virtual Sensor * OPAL_CALL getSensor( unsigned int i ) const;
00107 
00109 
00112             OPAL_DECL virtual Solid * OPAL_CALL detachSolid( unsigned int i );
00113 
00115             OPAL_DECL virtual Joint* OPAL_CALL detachJoint( unsigned int i );
00116 
00118             OPAL_DECL virtual Motor* OPAL_CALL detachMotor( unsigned int i );
00119 
00121             OPAL_DECL virtual Sensor* OPAL_CALL detachSensor( unsigned int i );
00122 
00124 
00127             OPAL_DECL virtual Solid * OPAL_CALL detachSolid( const std::string & name );
00128 
00132             OPAL_DECL virtual void OPAL_CALL internal_addSolid( Solid* s );
00133 
00137             OPAL_DECL virtual void OPAL_CALL internal_addJoint( Joint* j );
00138 
00142             OPAL_DECL virtual void OPAL_CALL internal_addMotor( Motor* m );
00143 
00147             OPAL_DECL virtual void OPAL_CALL internal_addSensor( Sensor* s );
00148 
00149         private:
00151             std::map<std::string, Solid*> mSolidMap;
00152 
00154             std::map<std::string, Joint*> mJointMap;
00155 
00157             std::map<std::string, Motor*> mMotorMap;
00158 
00160             std::map<std::string, Sensor*> mSensorMap;
00161 
00163             std::vector<Solid*> mSolidList;
00164 
00166             std::vector<Joint*> mJointList;
00167 
00169             std::vector<Motor*> mMotorList;
00170 
00172             std::vector<Sensor*> mSensorList;
00173     };
00174 }
00175 
00176 #endif

Generated on Tue May 16 17:49:50 2006 for OPAL by  doxygen 1.4.6-NO