OpenSceneGraph
3.0.1
|
Internal structure for storing all user data. More...
Public Types | |
typedef std::vector< std::string > | DescriptionList |
Public Member Functions | |
UserDataContainer () | |
UserDataContainer (const UserDataContainer &udc, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
virtual bool | isSameKindAs (const Object *obj) const |
virtual const char * | libraryName () const |
return the name of the object's library. | |
virtual const char * | className () const |
return the name of the object's class type. | |
virtual void | setUserData (Referenced *obj)=0 |
Set user data, data must be subclassed from Referenced to allow automatic memory handling. | |
virtual Referenced * | getUserData ()=0 |
Get user data. | |
virtual const Referenced * | getUserData () const =0 |
Get const user data. | |
virtual unsigned int | addUserObject (Object *obj)=0 |
Add user data object. | |
virtual void | setUserObject (unsigned int i, Object *obj)=0 |
Add element to list of user data objects. | |
virtual void | removeUserObject (unsigned int i)=0 |
Remove element from the list of user data objects. | |
virtual Object * | getUserObject (unsigned int i)=0 |
Get user data object as specified index position. | |
virtual const Object * | getUserObject (unsigned int i) const =0 |
Get const user data object as specified index position. | |
virtual unsigned int | getNumUserObjects () const =0 |
Get number of user objects assigned to this object. | |
virtual unsigned int | getUserObjectIndex (const osg::Object *obj, unsigned int startPos=0) const =0 |
Get the index position of specified user data object. | |
virtual unsigned int | getUserObjectIndex (const std::string &name, unsigned int startPos=0) const =0 |
Get the index position of first user data object that matches specified name. | |
virtual Object * | getUserObject (const std::string &name, unsigned int startPos=0) |
Get first user data object with specified name. | |
virtual const Object * | getUserObject (const std::string &name, unsigned int startPos=0) const |
Get first const user data object with specified name. | |
virtual void | setDescriptions (const DescriptionList &descriptions)=0 |
Set the list of string descriptions. | |
virtual DescriptionList & | getDescriptions ()=0 |
Get the description list. | |
virtual const DescriptionList & | getDescriptions () const =0 |
Get the const description list. | |
virtual unsigned int | getNumDescriptions () const =0 |
Get number of description strings. | |
virtual void | addDescription (const std::string &desc)=0 |
Add a description string. | |
Protected Member Functions | |
virtual | ~UserDataContainer () |
Internal structure for storing all user data.
typedef std::vector<std::string> osg::UserDataContainer::DescriptionList |
osg::UserDataContainer::UserDataContainer | ( | ) |
osg::UserDataContainer::UserDataContainer | ( | const UserDataContainer & | udc, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
virtual osg::UserDataContainer::~UserDataContainer | ( | ) | [inline, protected, virtual] |
virtual void osg::UserDataContainer::addDescription | ( | const std::string & | desc | ) | [pure virtual] |
Add a description string.
Implemented in osg::DefaultUserDataContainer.
virtual unsigned int osg::UserDataContainer::addUserObject | ( | Object * | obj | ) | [pure virtual] |
Add user data object.
Returns the index position of object added.
Implemented in osg::DefaultUserDataContainer.
Referenced by osg::Object::setUserValue().
virtual const char* osg::UserDataContainer::className | ( | ) | const [inline, virtual] |
return the name of the object's class type.
Must be defined by derived classes.
Implements osg::Object.
virtual DescriptionList& osg::UserDataContainer::getDescriptions | ( | ) | [pure virtual] |
Get the description list.
Implemented in osg::DefaultUserDataContainer.
virtual const DescriptionList& osg::UserDataContainer::getDescriptions | ( | ) | const [pure virtual] |
Get the const description list.
Implemented in osg::DefaultUserDataContainer.
virtual unsigned int osg::UserDataContainer::getNumDescriptions | ( | ) | const [pure virtual] |
Get number of description strings.
Implemented in osg::DefaultUserDataContainer.
virtual unsigned int osg::UserDataContainer::getNumUserObjects | ( | ) | const [pure virtual] |
Get number of user objects assigned to this object.
Implemented in osg::DefaultUserDataContainer.
virtual Referenced* osg::UserDataContainer::getUserData | ( | ) | [pure virtual] |
virtual const Referenced* osg::UserDataContainer::getUserData | ( | ) | const [pure virtual] |
virtual Object* osg::UserDataContainer::getUserObject | ( | unsigned int | i | ) | [pure virtual] |
Get user data object as specified index position.
Implemented in osg::DefaultUserDataContainer.
Referenced by osg::Object::getUserValue().
virtual const Object* osg::UserDataContainer::getUserObject | ( | unsigned int | i | ) | const [pure virtual] |
Get const user data object as specified index position.
Implemented in osg::DefaultUserDataContainer.
virtual Object* osg::UserDataContainer::getUserObject | ( | const std::string & | name, |
unsigned int | startPos = 0 |
||
) | [virtual] |
Get first user data object with specified name.
virtual const Object* osg::UserDataContainer::getUserObject | ( | const std::string & | name, |
unsigned int | startPos = 0 |
||
) | const [virtual] |
Get first const user data object with specified name.
virtual unsigned int osg::UserDataContainer::getUserObjectIndex | ( | const osg::Object * | obj, |
unsigned int | startPos = 0 |
||
) | const [pure virtual] |
Get the index position of specified user data object.
Implemented in osg::DefaultUserDataContainer.
Referenced by osg::Object::setUserValue().
virtual unsigned int osg::UserDataContainer::getUserObjectIndex | ( | const std::string & | name, |
unsigned int | startPos = 0 |
||
) | const [pure virtual] |
Get the index position of first user data object that matches specified name.
Implemented in osg::DefaultUserDataContainer.
virtual bool osg::UserDataContainer::isSameKindAs | ( | const Object * | obj | ) | const [inline, virtual] |
Reimplemented from osg::Object.
virtual const char* osg::UserDataContainer::libraryName | ( | ) | const [inline, virtual] |
return the name of the object's library.
Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.
Implements osg::Object.
virtual void osg::UserDataContainer::removeUserObject | ( | unsigned int | i | ) | [pure virtual] |
Remove element from the list of user data objects.
Implemented in osg::DefaultUserDataContainer.
virtual void osg::UserDataContainer::setDescriptions | ( | const DescriptionList & | descriptions | ) | [pure virtual] |
Set the list of string descriptions.
Implemented in osg::DefaultUserDataContainer.
virtual void osg::UserDataContainer::setUserData | ( | Referenced * | obj | ) | [pure virtual] |
Set user data, data must be subclassed from Referenced to allow automatic memory handling.
If your own data isn't directly subclassed from Referenced then create an adapter object which points to your own object and handles the memory addressing.
Reimplemented from osg::Object.
Implemented in osg::DefaultUserDataContainer.
virtual void osg::UserDataContainer::setUserObject | ( | unsigned int | i, |
Object * | obj | ||
) | [pure virtual] |
Add element to list of user data objects.
Implemented in osg::DefaultUserDataContainer.
Referenced by osg::Object::setUserValue().
![]() | Generated at Mon Oct 3 2011 12:39:45 for the OpenSceneGraph by doxygen 1.7.5. |