20 #if !defined(__MITSUBA_CORE_COBJECT_H_)
21 #define __MITSUBA_CORE_COBJECT_H_
23 #include <mitsuba/mitsuba.h>
58 virtual void configure();
64 inline const std::string &
getID()
const {
return m_properties.getID(); }
67 inline void setID(
const std::string &name) { m_properties.setID(name); }
99 #define MTS_EXPORT_PLUGIN(name, descr) \
101 void MTS_EXPORT *CreateInstance(const Properties &props) { \
102 return new name(props); \
104 const char MTS_EXPORT *GetDescription() { \
const Properties & getProperties() const
Return the properties object that was originally used to create this instance.
Definition: cobject.h:77
Generic serializable object, which supports construction from a Properties instance.
Definition: cobject.h:40
ConfigurableObject(const Properties &props)
Construct a configurable object.
Definition: cobject.h:85
Base class of all reference-counted objects with serialization support.
Definition: serialization.h:35
Properties m_properties
Definition: cobject.h:91
virtual void serialize(Stream *stream, InstanceManager *manager) const =0
Serialize this object to a stream.
#define MTS_EXPORT_CORE
Definition: getopt.h:29
const std::string & getID() const
Return the identifier associated with this instance (or "unnamed")
Definition: cobject.h:64
void addChild(ConfigurableObject *child)
Add an unnamed child.
Definition: cobject.h:54
Abstract seekable stream class.
Definition: stream.h:58
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
void setID(const std::string &name)
Set the identifier associated with this instance.
Definition: cobject.h:67
Associative parameter map for constructing subclasses of ConfigurableObject.
Definition: properties.h:46
Coordinates the serialization and unserialization of object graphs.
Definition: serialization.h:65