Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::InstanceManager Class Reference

Coordinates the serialization and unserialization of object graphs. More...

#include <mitsuba/core/serialization.h>

+ Inheritance diagram for mitsuba::InstanceManager:

Public Member Functions

 InstanceManager ()
 Construct a new instance manager. More...
 
SerializableObjectgetInstance (Stream *stream)
 Retrieve an instance from the given stream. More...
 
void serialize (Stream *stream, const SerializableObject *inst)
 Store an instance to the given stream. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Friends

class SerializableObject
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Detailed Description

Coordinates the serialization and unserialization of object graphs.

When serializaing a complicated object graph to a binary data stream, the instance manager annotates the data stream to avoid serializing objects twice or becoming stuck in a cyclic dependency. This allows arbitrary connected graphs to be serialized.

Similarly when unserializing a stream, it ensures that the resulting object graph has the same structure.

Constructor & Destructor Documentation

mitsuba::InstanceManager::InstanceManager ( )

Construct a new instance manager.

Member Function Documentation

virtual const Class* mitsuba::InstanceManager::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from Object.

SerializableObject* mitsuba::InstanceManager::getInstance ( Stream stream)

Retrieve an instance from the given stream.

void mitsuba::InstanceManager::serialize ( Stream stream,
const SerializableObject inst 
)

Store an instance to the given stream.

Friends And Related Function Documentation

friend class SerializableObject
friend

Member Data Documentation

Class* mitsuba::InstanceManager::m_theClass
static

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