Generic serializable object, which supports construction from a Properties instance. More...
#include <mitsuba/core/cobject.h>
Public Member Functions | |
virtual void | setParent (ConfigurableObject *parent) |
Notify the ConfigurableObject instance about its parent object. More... | |
virtual void | addChild (const std::string &name, ConfigurableObject *child) |
Add a child (default implementation throws an error) More... | |
void | addChild (ConfigurableObject *child) |
Add an unnamed child. More... | |
virtual void | configure () |
Configure the object (called once after construction and addition of all child ConfigurableObject instances)) More... | |
virtual void | serialize (Stream *stream, InstanceManager *manager) const |
Serialize this object to a binary data stream. More... | |
const std::string & | getID () const |
Return the identifier associated with this instance (or "unnamed") More... | |
void | setID (const std::string &name) |
Set the identifier associated with this instance. More... | |
const Properties & | getProperties () const |
Return the properties object that was originally used to create this instance. More... | |
virtual const Class * | getClass () const |
Retrieve this object's class. More... | |
Public Member Functions inherited from mitsuba::SerializableObject | |
SerializableObject (Stream *stream, InstanceManager *manager) | |
Unserialize a serializable object. 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 Class * | m_theClass |
Static Public Attributes inherited from mitsuba::SerializableObject | |
static Class * | m_theClass |
Static Public Attributes inherited from Object | |
static Class * | m_theClass |
Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
virtual | ~ConfigurableObject () |
Virtual destructor. More... | |
ConfigurableObject (const Properties &props) | |
Construct a configurable object. More... | |
ConfigurableObject (Stream *stream, InstanceManager *manager) | |
Unserialize a configurable object. More... | |
Protected Member Functions inherited from mitsuba::SerializableObject | |
SerializableObject () | |
Construct a serializable object. More... | |
virtual | ~SerializableObject () |
Virtual deconstructor. More... | |
Protected Member Functions inherited from Object | |
virtual | ~Object () |
Virtual private deconstructor. (Will only be called by ref) More... | |
Protected Attributes | |
Properties | m_properties |
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... | |
Generic serializable object, which supports construction from a Properties instance.
All plugins in Mitsuba derive from ConfigurableObject. This mechanism lets them accept parameters specified in an external XML file. Additionally, they can have child objects, which correspond to nested instantiation requests in the XML file.
|
inlineprotectedvirtual |
Virtual destructor.
|
inlineprotected |
Construct a configurable object.
|
protected |
Unserialize a configurable object.
|
virtual |
Add a child (default implementation throws an error)
Reimplemented in mitsuba::Shape, mitsuba::BSDF, mitsuba::AbstractEmitter, mitsuba::Sensor, mitsuba::Medium, mitsuba::Scene, and mitsuba::Film.
|
inline |
Add an unnamed child.
|
virtual |
Configure the object (called once after construction and addition of all child ConfigurableObject instances))
Reimplemented in mitsuba::PerspectiveCamera, mitsuba::Shape, mitsuba::BSDF, mitsuba::Sensor, mitsuba::TriMesh, mitsuba::Medium, mitsuba::Scene, mitsuba::PhaseFunction, mitsuba::Film, and mitsuba::ReconstructionFilter.
|
virtual |
Retrieve this object's class.
Reimplemented from mitsuba::SerializableObject.
Reimplemented in mitsuba::Scene, mitsuba::Emitter, mitsuba::PerspectiveCamera, mitsuba::Shape, mitsuba::BSDF, mitsuba::ProjectiveCamera, mitsuba::MonteCarloIntegrator, mitsuba::SamplingIntegrator, mitsuba::AbstractEmitter, mitsuba::Sensor, mitsuba::SpectrumProductTexture, mitsuba::TriMesh, mitsuba::SpectrumSubtractionTexture, mitsuba::PhaseFunction, mitsuba::SpectrumAdditionTexture, mitsuba::Medium, mitsuba::Sampler, mitsuba::Texture2D, mitsuba::ConstantFloatTexture, mitsuba::Integrator, mitsuba::Film, mitsuba::Texture, mitsuba::ReplayableSampler, mitsuba::ConstantSpectrumTexture, mitsuba::ReconstructionFilter, mitsuba::VolumeDataSource, mitsuba::Subsurface, and mitsuba::NetworkedObject.
|
inline |
Return the identifier associated with this instance (or "unnamed")
|
inline |
Return the properties object that was originally used to create this instance.
This feature mainly of use for editors and other graphical user interfaces, which present the properties of an object in some form.
|
virtual |
Serialize this object to a binary data stream.
Implements mitsuba::SerializableObject.
Reimplemented in mitsuba::Scene, mitsuba::Emitter, mitsuba::PerspectiveCamera, mitsuba::Shape, mitsuba::BSDF, mitsuba::MonteCarloIntegrator, mitsuba::ProjectiveCamera, mitsuba::SamplingIntegrator, mitsuba::AbstractEmitter, mitsuba::Sensor, mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::TriMesh, mitsuba::SpectrumAdditionTexture, mitsuba::Medium, mitsuba::Sampler, mitsuba::ConstantFloatTexture, mitsuba::Texture2D, mitsuba::Integrator, mitsuba::Film, mitsuba::Texture, mitsuba::ConstantSpectrumTexture, mitsuba::ReconstructionFilter, mitsuba::ReplayableSampler, mitsuba::Subsurface, mitsuba::NetworkedObject, and mitsuba::VolumeDataSource.
|
inline |
Set the identifier associated with this instance.
|
virtual |
Notify the ConfigurableObject instance about its parent object.
The default implementation does nothing.
Reimplemented in mitsuba::BSDF, and mitsuba::Subsurface.
|
protected |
|
static |