RobWorkProject  24.6.21-
Public Types | Public Member Functions | Static Public Member Functions | List of all members
PropertyType Class Reference

Represents type of a property. More...

#include <PropertyType.hpp>

Public Types

enum  Types {
  Unknown = -1 , PropertyMap = 0 , PropertyMapPtr , PropertyValueBasePtrList ,
  String , Float , Double , Int ,
  Bool , Vector3D , Vector2D , Q ,
  Transform3D , Rotation3D , RPY , EAA ,
  Quaternion , Rotation2D , VelocityScrew6D , QPath ,
  QPathPtr , Transform3DPath , Transform3DPathPtr , StringList ,
  IntList , DoubleList , User = 1024
}
 Predefined types. More...
 

Public Member Functions

 PropertyType ()
 
 PropertyType (int id)
 Construct PropertyType with the specified type. More...
 
int getId () const
 Returns id of the type. More...
 

Static Public Member Functions

static int getNewID ()
 Constructs a new ID for a property type. The ID will be unique. More...
 
static PropertyType getType (const rw::core::PropertyMap &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::core::Ptr< rw::core::PropertyMap > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const std::vector< rw::core::Ptr< rw::core::PropertyValueBase >> &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const std::string &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (float value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (double value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (int value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (bool value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Vector3D< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Vector2D< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Q &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Transform3D< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Rotation3D< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::RPY< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::EAA< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Quaternion< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::Rotation2D< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::math::VelocityScrew6D< double > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::trajectory::Path< rw::math::Q > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::core::Ptr< rw::trajectory::Path< rw::math::Q >> &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::trajectory::Path< rw::math::Transform3D< double >> &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const rw::core::Ptr< rw::trajectory::Path< rw::math::Transform3D< double >>> &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const std::vector< std::string > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const std::vector< int > &value)
 Get the type of a value resolved at compile time. More...
 
static PropertyType getType (const std::vector< double > &value)
 Get the type of a value resolved at compile time. More...
 
template<class T >
static PropertyType getType (const T &value)
 Get the type of a generic value T resolved at compile time. More...
 

Detailed Description

Represents type of a property.

PropertyType has a number of predefined property types. Besides it generates unique id's for new user defined types

Member Enumeration Documentation

◆ Types

enum Types

Predefined types.

Enumerator
Unknown 

Unknown type.

PropertyMap 

PropertyMap.

PropertyMapPtr 

PropertyMap::Ptr.

PropertyValueBasePtrList 

std::vector<rw::core::PropertyValueBase::Ptr>

String 

std::string

Float 

float

Double 

double

Int 

int

Bool 

bool

Vector3D 

rw::math::Vector3D

Vector2D 

rw::math::Vector2D

rw::math::Q

Transform3D 

rw::math::Transform3D

Rotation3D 

rw::math::Rotation3D

RPY 

rw::math::RPY

EAA 

rw::math::EAA

Quaternion 

rw::math::Quaternion

Rotation2D 

rw::math::Rotation2D

VelocityScrew6D 

rw::math::VelocityScrew6D

QPath 

rw::trajectory::QPath

QPathPtr 

rw::trajectory::QPath::Ptr

Transform3DPath 

rw::trajectory::Transform3DPath

Transform3DPathPtr 

rw::trajectory::Transform3DPath::Ptr

StringList 

std::vector<std::string>

IntList 

std::vector<int>

DoubleList 

std::vector<double>

User 

First user defined type. Returned by first call to PropertyType::getNewID()

Constructor & Destructor Documentation

◆ PropertyType() [1/2]

PropertyType ( )
inline

brief Constructs PropertyType with type UNKNOWN

◆ PropertyType() [2/2]

PropertyType ( int  id)
inline

Construct PropertyType with the specified type.

Parameters
id[in] either one of the predefined types or a user defined type, generated by getNewID().

Member Function Documentation

◆ getId()

int getId ( ) const
inline

Returns id of the type.

Returns
the id

◆ getNewID()

static int getNewID ( )
static

Constructs a new ID for a property type. The ID will be unique.

Returns
the id

◆ getType() [1/26]

static PropertyType getType ( bool  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [2/26]

static PropertyType getType ( const rw::core::PropertyMap value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [3/26]

static PropertyType getType ( const rw::core::Ptr< rw::core::PropertyMap > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [4/26]

static PropertyType getType ( const rw::core::Ptr< rw::trajectory::Path< rw::math::Q >> &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [5/26]

static PropertyType getType ( const rw::core::Ptr< rw::trajectory::Path< rw::math::Transform3D< double >>> &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [6/26]

static PropertyType getType ( const rw::math::EAA< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [7/26]

static PropertyType getType ( const rw::math::Q value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [8/26]

static PropertyType getType ( const rw::math::Quaternion< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [9/26]

static PropertyType getType ( const rw::math::Rotation2D< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [10/26]

static PropertyType getType ( const rw::math::Rotation3D< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [11/26]

static PropertyType getType ( const rw::math::RPY< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [12/26]

static PropertyType getType ( const rw::math::Transform3D< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [13/26]

static PropertyType getType ( const rw::math::Vector2D< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [14/26]

static PropertyType getType ( const rw::math::Vector3D< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [15/26]

static PropertyType getType ( const rw::math::VelocityScrew6D< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [16/26]

static PropertyType getType ( const rw::trajectory::Path< rw::math::Q > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [17/26]

static PropertyType getType ( const rw::trajectory::Path< rw::math::Transform3D< double >> &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [18/26]

static PropertyType getType ( const std::string &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [19/26]

static PropertyType getType ( const std::vector< double > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [20/26]

static PropertyType getType ( const std::vector< int > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [21/26]

static PropertyType getType ( const std::vector< rw::core::Ptr< rw::core::PropertyValueBase >> &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [22/26]

static PropertyType getType ( const std::vector< std::string > &  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [23/26]

static PropertyType getType ( const T &  value)
inlinestatic

Get the type of a generic value T resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
This method will always return PropertyType::Unknown to indicate that no concrete type exist for the given value.

◆ getType() [24/26]

static PropertyType getType ( double  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [25/26]

static PropertyType getType ( float  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

◆ getType() [26/26]

static PropertyType getType ( int  value)
inlinestatic

Get the type of a value resolved at compile time.

Parameters
value[in] the value to deduct type for.
Returns
the PropertyType corresponding to the type of the given value.

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