PxUserReferences Class Reference
[Common]
Container for user-defined names/references.
More...
#include <PxSerialFramework.h>
Public Member Functions | |
virtual | ~PxUserReferences () |
PX_DEPRECATED PX_INLINE PxSerializable * | getObjectFromID (PxSerialObjectRef ref) const |
Deprecated alias for getObjectFromRef. | |
PX_DEPRECATED PX_INLINE void | setUserData (PxSerializable *object, PxSerialObjectRef ref) |
Deprecated alias for setObjectRef. | |
virtual PxSerializable * | getObjectFromRef (PxSerialObjectRef ref) const =0 |
Gets PxSerializable object from its object reference. | |
virtual bool | setObjectRef (PxSerializable &object, PxSerialObjectRef ref)=0 |
Sets the object reference for a PxSerializable. | |
virtual bool | objectIsReferenced (PxSerializable &object) const =0 |
test whether an object is referenced by this UserReferences | |
virtual PxU32 | getNbObjectRefs () const =0 |
Retrieves the number of object references. | |
virtual PxU32 | getObjectRefs (PxSerialObjectAndRef *buffer, PxU32 bufSize) const =0 |
Retrieve all object reference pairs. | |
virtual void | release ()=0 |
Deletes a user references object. |
Detailed Description
Container for user-defined names/references.This is mainly a "link" object accessed by the framework when serializing and deserializing subsets.
- See also:
- PxSerializable
Constructor & Destructor Documentation
virtual PxUserReferences::~PxUserReferences | ( | ) | [inline, virtual] |
Member Function Documentation
virtual PxU32 PxUserReferences::getNbObjectRefs | ( | ) | const [pure virtual] |
PX_DEPRECATED PX_INLINE PxSerializable* PxUserReferences::getObjectFromID | ( | PxSerialObjectRef | ref | ) | const [inline] |
Deprecated alias for getObjectFromRef.
- Parameters:
-
[in] ref user-defined reference for this object
- Returns:
- Corresponding object, or NULL if not found
virtual PxSerializable* PxUserReferences::getObjectFromRef | ( | PxSerialObjectRef | ref | ) | const [pure virtual] |
Gets PxSerializable object from its object reference.
This is called by the framework during deserialization, when external references are passed to the deserialize function.
- Parameters:
-
[in] ref user-defined reference for this object
- Returns:
- Corresponding object, or NULL if not found
- See also:
- PxSerializable
virtual PxU32 PxUserReferences::getObjectRefs | ( | PxSerialObjectAndRef * | buffer, | |
PxU32 | bufSize | |||
) | const [pure virtual] |
Retrieve all object reference pairs.
- Parameters:
-
[in] buffer an pointer to a buffer into which to write the pairs [in] bufSize the size of the buffer
- Returns:
- the number of pairs written
- See also:
- setObjectRef getNbObjectRefs
virtual bool PxUserReferences::objectIsReferenced | ( | PxSerializable & | object | ) | const [pure virtual] |
test whether an object is referenced by this UserReferences
Note that in general the mapping from references to objects may be many-to-one.
- Returns:
- whether the object is referenced
- See also:
- setObjectRef getNbObjectRefs
virtual void PxUserReferences::release | ( | ) | [pure virtual] |
virtual bool PxUserReferences::setObjectRef | ( | PxSerializable & | object, | |
PxSerialObjectRef | ref | |||
) | [pure virtual] |
Sets the object reference for a PxSerializable.
This is called by the framework during deserialization, when object references are retrieved from a deserialized collection.
This can also be called by users to link a subset to a completely different subset than the one it was originally linked to.
- Parameters:
-
[in] object Serializable object. See PxSerializable [in] ref user-defined reference for this object
- Returns:
- true if success
- See also:
- PxSerializable
PX_DEPRECATED PX_INLINE void PxUserReferences::setUserData | ( | PxSerializable * | object, | |
PxSerialObjectRef | ref | |||
) | [inline] |
Deprecated alias for setObjectRef.
- Parameters:
-
[in] object Serializable object. See PxSerializable [in] ref user-defined object reference for this object
- See also:
- setObjectRef
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com