API  4.1
For C++ developers
OpenSim::Property< T >::TypeHelper Struct Reference

This is the generic definition of Property::TypeHelper to be used whenever T does not have a specialization, meaning that T must be a type derived from class Object. More...

Static Public Member Functions

static ObjectProperty< T > * create (const std::string &name, bool isOne)
 
static const std::string & getTypeName ()
 
static bool isEqual (const T &a, const T &b)
 
static SimpleProperty< bool > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static bool isEqual (bool a, bool b)
 
static SimpleProperty< int > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static bool isEqual (int a, int b)
 
static SimpleProperty< std::string > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static bool isEqual (const std::string &a, const std::string &b)
 
static SimpleProperty< double > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static OSIMCOMMON_API bool isEqual (double a, double b)
 
static SimpleProperty< SimTK::Vec3 > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static OSIMCOMMON_API bool isEqual (const SimTK::Vec3 &a, const SimTK::Vec3 &b)
 
static SimpleProperty< SimTK::Vec6 > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static OSIMCOMMON_API bool isEqual (const SimTK::Vec6 &a, const SimTK::Vec6 &b)
 
static SimpleProperty< SimTK::Vector > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static OSIMCOMMON_API bool isEqual (const SimTK::Vector &a, const SimTK::Vector &b)
 
static SimpleProperty< SimTK::Transform > * create (const std::string &name, bool isOne)
 
static std::string getTypeName ()
 
static OSIMCOMMON_API bool isEqual (const SimTK::Transform &a, const SimTK::Transform &b)
 

Static Public Attributes

static const bool IsObjectType = true
 

Detailed Description

template<class T>
struct OpenSim::Property< T >::TypeHelper

This is the generic definition of Property::TypeHelper to be used whenever T does not have a specialization, meaning that T must be a type derived from class Object.

TypeHelper specialization for SimTK::Transform; see double specialization for information on floating point comparison.

TypeHelper specialization for SimTK::Vector; see double specialization for information on floating point comparison.

TypeHelper specialization for SimTK::Vec6; see double specialization for information on floating point comparison.

TypeHelper specialization for SimTK::Vec3; see double specialization for information on floating point comparison.

TypeHelper specialization for double.

TypeHelper specialization for std::string.

TypeHelper specialization for int.

TypeHelper specialization for bool.

Any non-Object type that is to be used as a property type must provide a specialization of this class.

Note that isEqual() operator here returns true if values are equal to within a tolerance. We also say NaN==NaN, which is not standard IEEE floating point behavior.

Member Function Documentation

◆ create() [1/9]

template<class T >
SimpleProperty< SimTK::Transform > * OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
inlinestatic

◆ create() [2/9]

template<class T>
static SimpleProperty<bool>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [3/9]

template<class T>
static SimpleProperty<int>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [4/9]

template<class T>
static SimpleProperty<std::string>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [5/9]

template<class T>
static SimpleProperty<double>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [6/9]

template<class T>
static SimpleProperty<SimTK::Vec3>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [7/9]

template<class T>
static SimpleProperty<SimTK::Vec6>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [8/9]

template<class T>
static SimpleProperty<SimTK::Vector>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ create() [9/9]

template<class T>
static SimpleProperty<SimTK::Transform>* OpenSim::Property< T >::TypeHelper::create ( const std::string &  name,
bool  isOne 
)
static

◆ getTypeName() [1/9]

template<class T>
static const std::string& OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [2/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [3/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [4/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [5/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [6/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [7/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [8/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ getTypeName() [9/9]

template<class T>
static std::string OpenSim::Property< T >::TypeHelper::getTypeName ( )
inlinestatic

◆ isEqual() [1/9]

template<class T>
static bool OpenSim::Property< T >::TypeHelper::isEqual ( const T &  a,
const T &  b 
)
inlinestatic

◆ isEqual() [2/9]

template<class T>
static bool OpenSim::Property< T >::TypeHelper::isEqual ( bool  a,
bool  b 
)
inlinestatic

◆ isEqual() [3/9]

template<class T>
static bool OpenSim::Property< T >::TypeHelper::isEqual ( int  a,
int  b 
)
inlinestatic

◆ isEqual() [4/9]

template<class T>
static bool OpenSim::Property< T >::TypeHelper::isEqual ( const std::string &  a,
const std::string &  b 
)
inlinestatic

◆ isEqual() [5/9]

template<class T>
static OSIMCOMMON_API bool OpenSim::Property< T >::TypeHelper::isEqual ( double  a,
double  b 
)
static

◆ isEqual() [6/9]

template<class T>
static OSIMCOMMON_API bool OpenSim::Property< T >::TypeHelper::isEqual ( const SimTK::Vec3 &  a,
const SimTK::Vec3 &  b 
)
static

◆ isEqual() [7/9]

template<class T>
static OSIMCOMMON_API bool OpenSim::Property< T >::TypeHelper::isEqual ( const SimTK::Vec6 &  a,
const SimTK::Vec6 &  b 
)
static

◆ isEqual() [8/9]

template<class T>
static OSIMCOMMON_API bool OpenSim::Property< T >::TypeHelper::isEqual ( const SimTK::Vector &  a,
const SimTK::Vector &  b 
)
static

◆ isEqual() [9/9]

template<class T>
static OSIMCOMMON_API bool OpenSim::Property< T >::TypeHelper::isEqual ( const SimTK::Transform &  a,
const SimTK::Transform &  b 
)
static

Member Data Documentation

◆ IsObjectType

template<class T>
static const bool OpenSim::Property< T >::TypeHelper::IsObjectType = true
static

The documentation for this struct was generated from the following file: