|
OSG
3.4.0
|
#include <ShapeAttribute.h>
Public Types | |
| enum | Type { UNKNOWN, INTEGER, DOUBLE, STRING } |
| ShapeAttribute data type. More... | |
Public Member Functions | |
| ShapeAttribute () | |
| ShapeAttribute (const char *name) | |
| ShapeAttribute (const char *name, int value) | |
| ShapeAttribute (const char *name, double value) | |
| ShapeAttribute (const char *name, const char *value) | |
| ShapeAttribute (const ShapeAttribute &sa) | |
| ~ShapeAttribute () | |
| ShapeAttribute & | operator= (const ShapeAttribute &sa) |
| int | compare (const osgSim::ShapeAttribute &sa) const |
| 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. More... | |
| void | setName (const std::string &name) |
| Set the attribute name. More... | |
| Type | getType () const |
| Get the attribute data type. More... | |
| int | getInt () const |
| Get the attribute data as an int. More... | |
| double | getDouble () const |
| Get the attribute data as a double. More... | |
| const char * | getString () const |
| Get the attribute data as a string. More... | |
| void | setValue (int value) |
| Set an integer attribute data. More... | |
| void | setValue (double value) |
| Set a double attribute data. More... | |
| void | setValue (const char *value) |
| Set a string attribute data. More... | |
Definition at line 25 of file ShapeAttribute.h.
ShapeAttribute data type.
| Enumerator | |
|---|---|
| UNKNOWN | |
| INTEGER | |
| DOUBLE | |
| STRING | |
Definition at line 29 of file ShapeAttribute.h.
| osgSim::ShapeAttribute::ShapeAttribute | ( | ) |
| osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name | ) |
| osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name, |
| int | value | ||
| ) |
| osgSim::ShapeAttribute::ShapeAttribute | ( | const char * | name, |
| double | value | ||
| ) |
| 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.
| osgSim::ShapeAttribute::ShapeAttribute | ( | const ShapeAttribute & | sa | ) |
| osgSim::ShapeAttribute::~ShapeAttribute | ( | ) |
| int osgSim::ShapeAttribute::compare | ( | const osgSim::ShapeAttribute & | sa | ) | const |
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
|
inline |
Get the attribute data as a double.
Definition at line 71 of file ShapeAttribute.h.
|
inline |
Get the attribute data as an int.
Definition at line 68 of file ShapeAttribute.h.
|
inline |
Get the attribute name.
Definition at line 59 of file ShapeAttribute.h.
|
inline |
Get the attribute data as a string.
Definition at line 74 of file ShapeAttribute.h.
|
inline |
Get the attribute data type.
Definition at line 65 of file ShapeAttribute.h.
|
inline |
Definition at line 55 of file ShapeAttribute.h.
|
inline |
Definition at line 56 of file ShapeAttribute.h.
| ShapeAttribute& osgSim::ShapeAttribute::operator= | ( | const ShapeAttribute & | sa | ) |
|
inline |
Definition at line 54 of file ShapeAttribute.h.
|
inline |
Set the attribute name.
Definition at line 62 of file ShapeAttribute.h.
|
inline |
Set an integer attribute data.
Definition at line 77 of file ShapeAttribute.h.
|
inline |
Set a double attribute data.
Definition at line 80 of file ShapeAttribute.h.
| void osgSim::ShapeAttribute::setValue | ( | const char * | value | ) |
Set a string attribute data.
| double osgSim::ShapeAttribute::_double |
Definition at line 97 of file ShapeAttribute.h.
| int osgSim::ShapeAttribute::_integer |
Definition at line 96 of file ShapeAttribute.h.
| char* osgSim::ShapeAttribute::_string |
Definition at line 98 of file ShapeAttribute.h.
1.8.8