OpenSceneGraph
Public Types | Public Member Functions | List of all members
osgSim::ShapeAttribute Class Reference
Collaboration diagram for osgSim::ShapeAttribute:
Collaboration graph
[legend]

Public Types

enum  Type { UNKNOWN, INTEGER, DOUBLE, STRING }
 ShapeAttribute data type.
 

Public Member Functions

 ShapeAttribute (const char *name)
 
 ShapeAttribute (const char *name, int value)
 
 ShapeAttribute (const char *name, double value)
 
 ShapeAttribute (const char *name, const char *value)
 Note, ShapeAttribute takes a copy of both name and value, the calling code should manage its own clean up of the original strings. More...
 
 ShapeAttribute (const ShapeAttribute &sa)
 
ShapeAttributeoperator= (const ShapeAttribute &sa)
 
int compare (const osgSim::ShapeAttribute &sa) const
 return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. More...
 
bool operator== (const osgSim::ShapeAttribute &sa) const
 
bool operator!= (const osgSim::ShapeAttribute &sa) const
 
bool operator< (const osgSim::ShapeAttribute &sa) const
 
const std::string & getName () const
 Get the attribute name.
 
void setName (const std::string &name)
 Set the attribute name.
 
Type getType () const
 Get the attribute data type.
 
int getInt () const
 Get the attribute data as an int.
 
double getDouble () const
 Get the attribute data as a double.
 
const char * getString () const
 Get the attribute data as a string.
 
void setValue (int value)
 Set an integer attribute data.
 
void setValue (double value)
 Set a double attribute data.
 
void setValue (const char *value)
 Set a string attribute data.
 

Constructor & Destructor Documentation

◆ ShapeAttribute()

osgSim::ShapeAttribute::ShapeAttribute ( const char *  name,
const char *  value 
)

Note, ShapeAttribute takes a copy of both name and value, the calling code should manage its own clean up of the original strings.

Member Function Documentation

◆ compare()

int osgSim::ShapeAttribute::compare ( const osgSim::ShapeAttribute sa) const

return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.


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