#include <Blueprint.h>
Public Member Functions | |
OPAL_DECL | Blueprint () |
virtual OPAL_DECL | ~Blueprint () |
virtual OPAL_DECL void OPAL_CALL | finalize () |
virtual OPAL_DECL bool OPAL_CALL | isFinalized () const |
virtual OPAL_DECL void OPAL_CALL | addSolid (SolidData *data) |
virtual OPAL_DECL void OPAL_CALL | addJoint (JointData *data) |
virtual OPAL_DECL void OPAL_CALL | addMotor (MotorData *data) |
virtual OPAL_DECL void OPAL_CALL | addSensor (SensorData *data) |
virtual OPAL_DECL unsigned int OPAL_CALL | getNumSolids () const |
virtual OPAL_DECL unsigned int OPAL_CALL | getNumJoints () const |
virtual OPAL_DECL unsigned int OPAL_CALL | getNumMotors () const |
virtual OPAL_DECL unsigned int OPAL_CALL | getNumSensors () const |
virtual OPAL_DECL SolidData *OPAL_CALL | getSolidData (unsigned int i) const |
virtual OPAL_DECL JointData *OPAL_CALL | getJointData (unsigned int i) const |
virtual OPAL_DECL MotorData *OPAL_CALL | getMotorData (unsigned int i) const |
virtual OPAL_DECL SensorData *OPAL_CALL | getSensorData (unsigned int i) const |
Private Member Functions | |
bool | solidExists (const std::string &name) |
bool | jointExists (const std::string &name) |
bool | motorExists (const std::string &name) |
bool | sensorExists (const std::string &name) |
int | getSolidIndex (const std::string &name) const |
int | getJointIndex (const std::string &name) const |
void | printFinalizedMessage () |
Private Attributes | |
bool | mFinalized |
std::vector< SolidData * > | mSolidList |
std::vector< JointData * > | mJointList |
std::vector< MotorData * > | mMotorList |
std::vector< SensorData * > | mSensorList |
Definition at line 49 of file Blueprint.h.
|
Definition at line 45 of file Blueprint.cpp. References mFinalized. |
|
Definition at line 50 of file Blueprint.cpp. References mSolidList. |
|
Adds a new JointData object to the Blueprint. Makes a deep copy of the given data. Definition at line 263 of file Blueprint.cpp. References jointExists(), mFinalized, mJointList, opal::JointData::name, OPAL_LOGGER, and printFinalizedMessage(). |
|
Adds a new MotorData object to the Blueprint. Makes a deep copy of the given data. Definition at line 284 of file Blueprint.cpp. References opal::ATTRACTOR_MOTOR, opal::GEARED_MOTOR, opal::MotorData::getType(), mFinalized, mMotorList, motorExists(), opal::MotorData::name, OPAL_LOGGER, printFinalizedMessage(), opal::SERVO_MOTOR, opal::SPRING_MOTOR, and opal::THRUSTER_MOTOR. |
|
Adds a new SensorData object to the Blueprint. Makes a deep copy of the given data. Definition at line 333 of file Blueprint.cpp. References opal::ACCELERATION_SENSOR, opal::SensorData::getType(), opal::INCLINE_SENSOR, mFinalized, opal::SensorData::name, OPAL_LOGGER, printFinalizedMessage(), opal::RAYCAST_SENSOR, sensorExists(), and opal::VOLUME_SENSOR. |
|
Adds a new SolidData object to the Blueprint. Makes a deep copy of the given data. Definition at line 242 of file Blueprint.cpp. References mFinalized, mSolidList, opal::SolidData::name, OPAL_LOGGER, printFinalizedMessage(), and solidExists(). |
|
Updates references among internal objects. This must be called before the Blueprint can be instantiated. This is automatically called on Blueprints loaded from files. Definition at line 77 of file Blueprint.cpp. References getSolidIndex(), mJointList, and OPAL_LOGGER. |
|
Returns a pointer to the JointData at the given index.
Definition at line 412 of file Blueprint.cpp. References mJointList. |
|
Returns the index of the given Joint name in the Blueprint's list of JointData. Returns -1 if the Joint name is not found or if the given name is an empty string. Definition at line 525 of file Blueprint.cpp. |
|
Returns a pointer to the MotorData at the given index.
Definition at line 417 of file Blueprint.cpp. References mMotorList. |
|
Returns the number of JointData objects.
Definition at line 392 of file Blueprint.cpp. References mJointList. |
|
Returns the number of MotorData objects.
Definition at line 397 of file Blueprint.cpp. References mMotorList. |
|
Returns the number of SensorData objects.
Definition at line 402 of file Blueprint.cpp. References mSensorList. |
|
Returns the number of SolidData objects.
Definition at line 387 of file Blueprint.cpp. References mSolidList. |
|
Returns a pointer to the SensorData at the given index.
Definition at line 422 of file Blueprint.cpp. References mSensorList. |
|
Returns a pointer to the SolidData at the given index.
Definition at line 407 of file Blueprint.cpp. References mSolidList. |
|
Returns the index of the given Solid name in the Blueprint's list of SolidData. Returns -1 if the Solid name is not found or if the given name is an empty string. Definition at line 507 of file Blueprint.cpp. Referenced by finalize(). |
|
Returns true if this Blueprint has been finalized (via the finalize function). Definition at line 237 of file Blueprint.cpp. References mFinalized. Referenced by opal::Simulator::instantiateBlueprint(). |
|
Helper function that returns true if a Joint of the given name already exists in the Blueprint. Ignores empty name strings. Definition at line 447 of file Blueprint.cpp. Referenced by addJoint(). |
|
Helper function that returns true if a Motor of the given name already exists in the Blueprint. Ignores empty name strings. Definition at line 467 of file Blueprint.cpp. Referenced by addMotor(). |
|
Prints a warning message saying that the Blueprint has already been finalized. Definition at line 543 of file Blueprint.cpp. References OPAL_LOGGER. Referenced by addJoint(), addMotor(), addSensor(), and addSolid(). |
|
Helper function that returns true if a Sensor of the given name already exists in the Blueprint. Ignores empty name strings. Definition at line 487 of file Blueprint.cpp. Referenced by addSensor(). |
|
Helper function that returns true if a Solid of the given name already exists in the Blueprint. Ignores empty name strings. Definition at line 427 of file Blueprint.cpp. Referenced by addSolid(). |
|
True if the Blueprint has been finalized.
Definition at line 145 of file Blueprint.h. Referenced by addJoint(), addMotor(), addSensor(), addSolid(), Blueprint(), and isFinalized(). |
|
The set of all Joint pointers in this Blueprint.
Definition at line 151 of file Blueprint.h. Referenced by addJoint(), finalize(), getJointData(), and getNumJoints(). |
|
The set of all Motor pointers in this Blueprint.
Definition at line 154 of file Blueprint.h. Referenced by addMotor(), getMotorData(), and getNumMotors(). |
|
The set of all Sensor pointers in this Blueprint.
Definition at line 157 of file Blueprint.h. Referenced by getNumSensors(), and getSensorData(). |
|
The set of all Solid pointers in this Blueprint.
Definition at line 148 of file Blueprint.h. Referenced by addSolid(), getNumSolids(), getSolidData(), and ~Blueprint(). |