OpenSim::Property Class Reference

#include <Property.h>

Inheritance diagram for OpenSim::Property:
OpenSim::PropertyBool OpenSim::PropertyBoolArray OpenSim::PropertyDbl OpenSim::PropertyDblArray OpenSim::PropertyDblVec_< M > OpenSim::PropertyInt OpenSim::PropertyIntArray OpenSim::PropertyObj OpenSim::PropertyObjArray< T > OpenSim::PropertyObjPtr< T > OpenSim::PropertyStr OpenSim::PropertyStrArray OpenSim::PropertyObjArray< Analysis > OpenSim::PropertyObjArray< Body > OpenSim::PropertyObjArray< BodyScale > OpenSim::PropertyObjArray< Constraint > OpenSim::PropertyObjArray< ContactGeometry > OpenSim::PropertyObjArray< Control > OpenSim::PropertyObjArray< Controller > OpenSim::PropertyObjArray< Coordinate > OpenSim::PropertyObjArray< DisplayGeometry > OpenSim::PropertyObjArray< ExternalForce > OpenSim::PropertyObjArray< Force > OpenSim::PropertyObjArray< Function > OpenSim::PropertyObjArray< IKTask > OpenSim::PropertyObjArray< Joint > OpenSim::PropertyObjArray< Marker > OpenSim::PropertyObjArray< MarkerPair > OpenSim::PropertyObjArray< Measurement > OpenSim::PropertyObjArray< ObjectGroup > OpenSim::PropertyObjArray< PathPoint > OpenSim::PropertyObjArray< PathWrap > OpenSim::PropertyObjArray< Scale > OpenSim::PropertyObjArray< TrackingTask > OpenSim::PropertyObjArray< WrapObject >

List of all members.

Public Types

enum  PropertyType {
  None = 0, Bool, Int, Dbl,
  Str, Obj, ObjPtr, BoolArray,
  IntArray, DblArray, StrArray, ObjArray,
  DblVec, Transform
}
 

Enumeration of recognized types.

More...
enum  PropertyCategory { NoCategory, Display, System, Dynamics }

Public Member Functions

 Property ()
 Default constructor.
 Property (PropertyType aType, const std::string &aName)
 Property (const Property &aProperty)
 Copy constructor.
virtual Propertycopy () const =0
virtual ~Property ()
void setNull ()
 Construct and return a copy of this property.
Propertyoperator= (const Property &aProperty)
 Assign this property to another.
virtual bool operator== (const Property &aProperty) const
 Determine if two properties are equal.
virtual bool operator< (const Property &aProperty) const
 Determine if this property is less than another.
void setType (PropertyType aType)
 Set the type of this property.
PropertyType getType () const
 Get the type of this property.
virtual const char * getTypeAsString () const
 Implementation of the output operator.
void setName (const std::string &aName)
const std::string & getName () const
 Get the name of this property.
void setComment (const std::string &aComment)
const std::string & getComment () const
virtual const std::string & toString ()=0
void setAllowableArraySize (int aMin, int aMax)
void setAllowableArraySize (int aNum)
int getMinArraySize ()
int getMaxArraySize ()
virtual void setValue (bool aValue)
virtual bool & getValueBool ()
virtual const bool & getValueBool () const
virtual void setValue (int aValue)
virtual int & getValueInt ()
virtual const int & getValueInt () const
virtual void setValue (double aValue)
virtual double & getValueDbl ()
virtual const double & getValueDbl () const
virtual void setValue (const std::string &aValue)
virtual std::string & getValueStr ()
virtual const std::string & getValueStr () const
virtual void setValue (int aSize, const bool aArray[])
virtual void setValue (const Array< bool > &aArray)
virtual Array< bool > & getValueBoolArray ()
virtual const Array< bool > & getValueBoolArray () const
virtual void setValue (int aSize, const int aArray[])
virtual void setValue (const Array< int > &aArray)
virtual Array< int > & getValueIntArray ()
virtual const Array< int > & getValueIntArray () const
virtual void setValue (int aSize, const double aArray[])
virtual void setValue (const Array< double > &aArray)
virtual Array< double > & getValueDblArray ()
virtual const Array< double > & getValueDblArray () const
virtual void setValue (int aSize, const std::string aArray[])
virtual void setValue (const Array< std::string > &aArray)
virtual Array< std::string > & getValueStrArray ()
virtual const Array
< std::string > & 
getValueStrArray () const
virtual bool isValidObject (const Object *aValue) const
virtual ObjectgetValueObj ()
virtual const ObjectgetValueObj () const
virtual void setValue (Object *aValue)
virtual ObjectgetValueObjPtr ()
virtual ObjectgetValueObjPtr (int index)
virtual void appendValue (Object *obj)
virtual void clearObjArray ()
void setUseDefault (bool aTrueFalse)
 Set whether or not this property uses a "default" property for its value.
bool getUseDefault () const
 Get whether or not this property uses a "default" property for its value.
virtual int getArraySize () const
template<class T >
T & getValue ()
template<class T >
const T & getValue () const
template<class T >
Array< T > & getValueArray ()
template<class T >
const Array< T > & getValueArray () const

Protected Attributes

std::string _comment
 Comment to be associated with property, shown for default objects only for efficiency.
std::string _valueString
 String representation of property.

Friends

std::ostream & operator<< (std::ostream &aOut, const Property &aProperty)

Member Enumeration Documentation

Enumerator:
NoCategory 
Display 
System 
Dynamics 

Enumeration of recognized types.

Enumerator:
None 
Bool 
Int 
Dbl 
Str 
Obj 
ObjPtr 
BoolArray 
IntArray 
DblArray 
StrArray 
ObjArray 
DblVec 
Transform 

Constructor & Destructor Documentation

Property::Property (  ) 

Default constructor.

OpenSim::Property::Property ( PropertyType  aType,
const std::string &  aName 
)
Property::Property ( const Property aProperty  ) 

Copy constructor.

Parameters:
aProperty Property to be copied.
virtual OpenSim::Property::~Property (  )  [inline, virtual]

Member Function Documentation

virtual void OpenSim::Property::appendValue ( Object obj  )  [inline, virtual]
virtual void OpenSim::Property::clearObjArray (  )  [inline, virtual]
virtual Property* OpenSim::Property::copy (  )  const [pure virtual]

Implemented in OpenSim::PropertyBool, OpenSim::PropertyBoolArray, OpenSim::PropertyDbl, OpenSim::PropertyDblArray, OpenSim::PropertyDblVec_< M >, OpenSim::PropertyInt, OpenSim::PropertyIntArray, OpenSim::PropertyObj, OpenSim::PropertyObjArray< T >, OpenSim::PropertyObjPtr< T >, OpenSim::PropertyStr, OpenSim::PropertyStrArray, OpenSim::PropertyTransform, OpenSim::PropertyDblVec_< 2 >, OpenSim::PropertyDblVec_< 3 >, OpenSim::PropertyObjArray< ExternalForce >, OpenSim::PropertyObjArray< ObjectGroup >, OpenSim::PropertyObjArray< JointReactionReference >, OpenSim::PropertyObjArray< Actuator >, OpenSim::PropertyObjArray< ContactGeometry >, OpenSim::PropertyObjArray< PathPoint >, OpenSim::PropertyObjArray< Coordinate >, OpenSim::PropertyObjArray< ControlLinearNode >, OpenSim::PropertyObjArray< MarkerWeight >, OpenSim::PropertyObjArray< WrapObject >, OpenSim::PropertyObjArray< IKTask >, OpenSim::PropertyObjArray< Force >, OpenSim::PropertyObjArray< Joint >, OpenSim::PropertyObjArray< MarkerPair >, OpenSim::PropertyObjArray< DisplayGeometry >, OpenSim::PropertyObjArray< ForcePerturbationFunction >, OpenSim::PropertyObjArray< Scale >, OpenSim::PropertyObjArray< Controller >, OpenSim::PropertyObjArray< Function >, OpenSim::PropertyObjArray< Muscle >, OpenSim::PropertyObjArray< PathWrap >, OpenSim::PropertyObjArray< TrackingTask >, OpenSim::PropertyObjArray< Measurement >, OpenSim::PropertyObjArray< BodyScale >, OpenSim::PropertyObjArray< Marker >, OpenSim::PropertyObjArray< Analysis >, OpenSim::PropertyObjArray< Body >, OpenSim::PropertyObjArray< Constraint >, OpenSim::PropertyObjArray< Control >, OpenSim::PropertyObjPtr< Joint >, OpenSim::PropertyObjPtr< Function >, and OpenSim::PropertyObjPtr< OpenSim::Function >.

virtual int OpenSim::Property::getArraySize (  )  const [inline, virtual]
const std::string& OpenSim::Property::getComment (  )  const [inline]
int OpenSim::Property::getMaxArraySize (  )  [inline]
int OpenSim::Property::getMinArraySize (  )  [inline]
const string & Property::getName (  )  const

Get the name of this property.

Name of this property

Property::PropertyType Property::getType (  )  const

Get the type of this property.

Returns:
Type of the property.
const char * Property::getTypeAsString (  )  const [virtual]

Implementation of the output operator.

The output consists of the type and name:

Parameters:
aOut Output stream.
aProperty Property to be output.
Returns:
Reference to the output stream. ostream& operator<<(ostream &aOut,const Property &aProperty) { aOut << aProperty.getTypeAsString() << " " << aProperty.getName(); return(aOut); } Get the type of this property as a string.
Type of the property.

Reimplemented in OpenSim::PropertyBool, OpenSim::PropertyBoolArray, OpenSim::PropertyDbl, OpenSim::PropertyDblArray, OpenSim::PropertyDblVec_< M >, OpenSim::PropertyInt, OpenSim::PropertyIntArray, OpenSim::PropertyObj, OpenSim::PropertyObjArray< T >, OpenSim::PropertyObjPtr< T >, OpenSim::PropertyStr, OpenSim::PropertyStrArray, OpenSim::PropertyTransform, OpenSim::PropertyDblVec_< 2 >, OpenSim::PropertyDblVec_< 3 >, OpenSim::PropertyObjArray< ExternalForce >, OpenSim::PropertyObjArray< ObjectGroup >, OpenSim::PropertyObjArray< JointReactionReference >, OpenSim::PropertyObjArray< Actuator >, OpenSim::PropertyObjArray< ContactGeometry >, OpenSim::PropertyObjArray< PathPoint >, OpenSim::PropertyObjArray< Coordinate >, OpenSim::PropertyObjArray< ControlLinearNode >, OpenSim::PropertyObjArray< MarkerWeight >, OpenSim::PropertyObjArray< WrapObject >, OpenSim::PropertyObjArray< IKTask >, OpenSim::PropertyObjArray< Force >, OpenSim::PropertyObjArray< Joint >, OpenSim::PropertyObjArray< MarkerPair >, OpenSim::PropertyObjArray< DisplayGeometry >, OpenSim::PropertyObjArray< ForcePerturbationFunction >, OpenSim::PropertyObjArray< Scale >, OpenSim::PropertyObjArray< Controller >, OpenSim::PropertyObjArray< Function >, OpenSim::PropertyObjArray< Muscle >, OpenSim::PropertyObjArray< PathWrap >, OpenSim::PropertyObjArray< TrackingTask >, OpenSim::PropertyObjArray< Measurement >, OpenSim::PropertyObjArray< BodyScale >, OpenSim::PropertyObjArray< Marker >, OpenSim::PropertyObjArray< Analysis >, OpenSim::PropertyObjArray< Body >, OpenSim::PropertyObjArray< Constraint >, OpenSim::PropertyObjArray< Control >, OpenSim::PropertyObjPtr< Joint >, OpenSim::PropertyObjPtr< Function >, and OpenSim::PropertyObjPtr< OpenSim::Function >.

bool Property::getUseDefault (  )  const

Get whether or not this property uses a "default" property for its value.

True means that this property should have the same value as some default property. False means that the value of this property is independent of the value of any other property.

Returns:
True if this property uses another property for its value; false if this property does not use another property for its value.
const std::string & OpenSim::Property::getValue (  )  const [inline]
std::string & OpenSim::Property::getValue (  )  [inline]
const Array< std::string > & OpenSim::Property::getValueArray (  )  const [inline]
Array< std::string > & OpenSim::Property::getValueArray (  )  [inline]
virtual const bool& OpenSim::Property::getValueBool (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyBool.

virtual bool& OpenSim::Property::getValueBool (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyBool.

virtual const Array<bool>& OpenSim::Property::getValueBoolArray (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyBoolArray.

virtual Array<bool>& OpenSim::Property::getValueBoolArray (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyBoolArray.

virtual const double& OpenSim::Property::getValueDbl (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyDbl.

virtual double& OpenSim::Property::getValueDbl (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyDbl.

virtual const Array<double>& OpenSim::Property::getValueDblArray (  )  const [inline, virtual]
virtual Array<double>& OpenSim::Property::getValueDblArray (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyDblArray.

virtual const int& OpenSim::Property::getValueInt (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyInt.

virtual int& OpenSim::Property::getValueInt (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyInt.

virtual const Array<int>& OpenSim::Property::getValueIntArray (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyIntArray.

virtual Array<int>& OpenSim::Property::getValueIntArray (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyIntArray.

virtual const Object& OpenSim::Property::getValueObj (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyObj.

virtual Object& OpenSim::Property::getValueObj (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyObj.

virtual Object* OpenSim::Property::getValueObjPtr ( int  index  )  [inline, virtual]
virtual Object* OpenSim::Property::getValueObjPtr (  )  [inline, virtual]
virtual const std::string& OpenSim::Property::getValueStr (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyStr.

virtual std::string& OpenSim::Property::getValueStr (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyStr.

virtual const Array<std::string>& OpenSim::Property::getValueStrArray (  )  const [inline, virtual]

Reimplemented in OpenSim::PropertyStrArray.

virtual Array<std::string>& OpenSim::Property::getValueStrArray (  )  [inline, virtual]

Reimplemented in OpenSim::PropertyStrArray.

virtual bool OpenSim::Property::isValidObject ( const Object aValue  )  const [inline, virtual]
bool Property::operator< ( const Property aProperty  )  const [virtual]

Determine if this property is less than another.

This property is less than another if the name of this string is less than the name of the other property.

Parameters:
aProperty Property for which to make the less than test.
Returns:
True if this property is less than the other, false otherwise.
Property & Property::operator= ( const Property aProperty  ) 
bool Property::operator== ( const Property aProperty  )  const [virtual]

Determine if two properties are equal.

Two properties are equal if their names are the same; the types do not need to be the same.

Parameters:
aProperty Property for which to make the equality test.
Returns:
True if the specified property and this property are equal, false otherwise.
void OpenSim::Property::setAllowableArraySize ( int  aNum  )  [inline]
void OpenSim::Property::setAllowableArraySize ( int  aMin,
int  aMax 
) [inline]
void OpenSim::Property::setComment ( const std::string &  aComment  )  [inline]
void OpenSim::Property::setName ( const std::string &  aName  ) 
void Property::setNull (  ) 

Construct and return a copy of this property.

The property is allocated using the new operator, so the caller is responsible for deleting the returned object.

Returns:
Copy of this property.

Property* Property::copy() const { Property *property = new Property(*this); return(property); } Set member variables to their null values.

void Property::setType ( PropertyType  aType  ) 

Set the type of this property.

Parameters:
aType Type of this object represented as a string. In most all cases, the type should be the name of the class.
void Property::setUseDefault ( bool  aTrueFalse  ) 

Set whether or not this property uses a "default" property for its value.

True means that this property should have the same value as some default property. False means that the value of this property is independent of the value of any other property.

Parameters:
aTrueFalse True means this property uses another property for its value. False means this property does not use another property for its value.
virtual void OpenSim::Property::setValue ( Object aValue  )  [inline, virtual]
virtual void OpenSim::Property::setValue ( const Array< std::string > &  aArray  )  [inline, virtual]

Reimplemented in OpenSim::PropertyStrArray.

virtual void OpenSim::Property::setValue ( int  aSize,
const std::string  aArray[] 
) [inline, virtual]

Reimplemented in OpenSim::PropertyStrArray.

virtual void OpenSim::Property::setValue ( const Array< double > &  aArray  )  [inline, virtual]
virtual void OpenSim::Property::setValue ( int  aSize,
const double  aArray[] 
) [inline, virtual]
virtual void OpenSim::Property::setValue ( const Array< int > &  aArray  )  [inline, virtual]

Reimplemented in OpenSim::PropertyIntArray.

virtual void OpenSim::Property::setValue ( int  aSize,
const int  aArray[] 
) [inline, virtual]

Reimplemented in OpenSim::PropertyIntArray.

virtual void OpenSim::Property::setValue ( const Array< bool > &  aArray  )  [inline, virtual]

Reimplemented in OpenSim::PropertyBoolArray.

virtual void OpenSim::Property::setValue ( int  aSize,
const bool  aArray[] 
) [inline, virtual]

Reimplemented in OpenSim::PropertyBoolArray.

virtual void OpenSim::Property::setValue ( const std::string &  aValue  )  [inline, virtual]

Reimplemented in OpenSim::PropertyStr.

virtual void OpenSim::Property::setValue ( double  aValue  )  [inline, virtual]

Reimplemented in OpenSim::PropertyDbl.

virtual void OpenSim::Property::setValue ( int  aValue  )  [inline, virtual]

Reimplemented in OpenSim::PropertyInt.

virtual void OpenSim::Property::setValue ( bool  aValue  )  [inline, virtual]

Reimplemented in OpenSim::PropertyBool.

virtual const std::string& OpenSim::Property::toString (  )  [pure virtual]

Implemented in OpenSim::PropertyBool, OpenSim::PropertyBoolArray, OpenSim::PropertyDbl, OpenSim::PropertyDblArray, OpenSim::PropertyDblVec_< M >, OpenSim::PropertyInt, OpenSim::PropertyIntArray, OpenSim::PropertyObj, OpenSim::PropertyObjArray< T >, OpenSim::PropertyObjPtr< T >, OpenSim::PropertyStr, OpenSim::PropertyStrArray, OpenSim::PropertyTransform, OpenSim::PropertyDblVec_< 2 >, OpenSim::PropertyDblVec_< 3 >, OpenSim::PropertyObjArray< ExternalForce >, OpenSim::PropertyObjArray< ObjectGroup >, OpenSim::PropertyObjArray< JointReactionReference >, OpenSim::PropertyObjArray< Actuator >, OpenSim::PropertyObjArray< ContactGeometry >, OpenSim::PropertyObjArray< PathPoint >, OpenSim::PropertyObjArray< Coordinate >, OpenSim::PropertyObjArray< ControlLinearNode >, OpenSim::PropertyObjArray< MarkerWeight >, OpenSim::PropertyObjArray< WrapObject >, OpenSim::PropertyObjArray< IKTask >, OpenSim::PropertyObjArray< Force >, OpenSim::PropertyObjArray< Joint >, OpenSim::PropertyObjArray< MarkerPair >, OpenSim::PropertyObjArray< DisplayGeometry >, OpenSim::PropertyObjArray< ForcePerturbationFunction >, OpenSim::PropertyObjArray< Scale >, OpenSim::PropertyObjArray< Controller >, OpenSim::PropertyObjArray< Function >, OpenSim::PropertyObjArray< Muscle >, OpenSim::PropertyObjArray< PathWrap >, OpenSim::PropertyObjArray< TrackingTask >, OpenSim::PropertyObjArray< Measurement >, OpenSim::PropertyObjArray< BodyScale >, OpenSim::PropertyObjArray< Marker >, OpenSim::PropertyObjArray< Analysis >, OpenSim::PropertyObjArray< Body >, OpenSim::PropertyObjArray< Constraint >, OpenSim::PropertyObjArray< Control >, OpenSim::PropertyObjPtr< Joint >, OpenSim::PropertyObjPtr< Function >, and OpenSim::PropertyObjPtr< OpenSim::Function >.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  aOut,
const Property aProperty 
) [friend]

Member Data Documentation

std::string OpenSim::Property::_comment [protected]

Comment to be associated with property, shown for default objects only for efficiency.

std::string OpenSim::Property::_valueString [protected]

String representation of property.


The documentation for this class was generated from the following files:

Generated on Sun Sep 25 00:19:50 2011 for OpenSim by  doxygen 1.6.1