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

Abstract work unit – represents a small amount of information that encodes part of a larger processing task. More...

#include <mitsuba/core/sched.h>

+ Inheritance diagram for mitsuba::WorkUnit:

Public Member Functions

virtual void set (const WorkUnit *workUnit)=0
 Copy the content of another work unit of the same type. More...
 
virtual void load (Stream *stream)=0
 Fill the work unit with content acquired from a binary data stream. More...
 
virtual void save (Stream *stream) const =0
 Serialize a work unit to a binary data stream. More...
 
virtual std::string toString () const =0
 Return a string representation. 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...
 

Static Public Attributes

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

Protected Member Functions

virtual ~WorkUnit ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

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...
 

Detailed Description

Abstract work unit – represents a small amount of information that encodes part of a larger processing task.

Instead of the usual serialization function and unserialization constructor, implementations of this class supply load() and save() methods that can be used for essentially the same purpose, but without requiring any memory allocations.

See Also
WorkProcessor

Constructor & Destructor Documentation

virtual mitsuba::WorkUnit::~WorkUnit ( )
inlineprotectedvirtual

Virtual destructor.

Member Function Documentation

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

Retrieve this object's class.

Reimplemented from Object.

Reimplemented in mitsuba::DummyWorkUnit, mitsuba::SeedWorkUnit, mitsuba::RangeWorkUnit, and mitsuba::RectangularWorkUnit.

virtual void mitsuba::WorkUnit::load ( Stream stream)
pure virtual

Fill the work unit with content acquired from a binary data stream.

Implemented in mitsuba::DummyWorkUnit, mitsuba::SeedWorkUnit, mitsuba::RangeWorkUnit, and mitsuba::RectangularWorkUnit.

virtual void mitsuba::WorkUnit::save ( Stream stream) const
pure virtual

Serialize a work unit to a binary data stream.

Implemented in mitsuba::DummyWorkUnit, mitsuba::SeedWorkUnit, mitsuba::RangeWorkUnit, and mitsuba::RectangularWorkUnit.

virtual void mitsuba::WorkUnit::set ( const WorkUnit workUnit)
pure virtual

Copy the content of another work unit of the same type.

Implemented in mitsuba::DummyWorkUnit, mitsuba::SeedWorkUnit, mitsuba::RectangularWorkUnit, and mitsuba::RangeWorkUnit.

virtual std::string mitsuba::WorkUnit::toString ( ) const
pure virtual

Return a string representation.

Reimplemented from Object.

Implemented in mitsuba::DummyWorkUnit, mitsuba::SeedWorkUnit, mitsuba::RangeWorkUnit, and mitsuba::RectangularWorkUnit.

Member Data Documentation

Class* mitsuba::WorkUnit::m_theClass
static

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