SIM_DataFactory Class Reference

#include <SIM_DataFactory.h>

List of all members.

Public Member Functions

 SIM_DataFactory (const char *datatype, const char *description, SIM_DataConstructor constructor, SIM_DataDestructor destructor, const SIM_DopDescription *dopdesc, const SIM_Engine *engine)
virtual ~SIM_DataFactory ()
 Destructor.
const SIM_EnginegetEngine () const
 Return the SIM_Engine that owns this factory.
const UT_StringgetDataType () const
const UT_StringgetDescription () const
const UT_StringgetSource () const
virtual SIM_DatanewData () const
 Create a new instance of our particular subclass of SIM_Data.
SIM_DatanewData (const UT_Guid &uniqueid) const
 Calls newData() to create some new data, then changes the unique id.
virtual void deleteData (SIM_Data *data) const
 Delete an instance of our particular subclass of SIM_Data.
virtual const SIM_DopDescriptiongetDopDescription () const
 Return our SIM_DopDescription.

Friends

class SIM_DataFactoryCreator


Detailed Description

This class provides a means of creating and destroying SIM_Data objects. Nothing needs to be known about the SIM_Data object except its data type name. It is possible to derive a subclass to use instead of relying on the default implementations used by the DECLARE_DATAFACTORY and IMPLEMENT_DATAFACTORY macros. But generally these macros will be sufficient.
Examples:

SIM/SIM_ElectricalProperties.C, SIM/SIM_ElectricalProperties.h, SIM/SIM_ForceOrbit.C, SIM/SIM_ForceOrbit.h, SIM/SIM_GasAdd.C, SIM/SIM_GasAdd.h, SIM/SIM_SolverHair.C, SIM/SIM_SolverHair.h, SIM/SNOW_Solver.C, and SIM/SNOW_Solver.h.

Definition at line 36 of file SIM_DataFactory.h.


Constructor & Destructor Documentation

SIM_DataFactory::SIM_DataFactory ( const char *  datatype,
const char *  description,
SIM_DataConstructor  constructor,
SIM_DataDestructor  destructor,
const SIM_DopDescription dopdesc,
const SIM_Engine engine 
)

Constructor which receives all the data for this factory. The constructor arguments contain all the information that may be required for the new data type without actually requiring an instance of that data type to be constructed.

virtual SIM_DataFactory::~SIM_DataFactory (  )  [virtual]

Destructor.


Member Function Documentation

virtual void SIM_DataFactory::deleteData ( SIM_Data data  )  const [virtual]

Delete an instance of our particular subclass of SIM_Data.

const UT_String& SIM_DataFactory::getDataType (  )  const

Get the name of the data type that is created by this factory. This is the unique identifier that is passed to a SIM_Object to create a new instance of this data type.

const UT_String& SIM_DataFactory::getDescription (  )  const

Gets a string that describes what this data type does. This descriptive string is what is presented to the user when given a menu of data type choices.

virtual const SIM_DopDescription* SIM_DataFactory::getDopDescription (  )  const [virtual]

Return our SIM_DopDescription.

const SIM_Engine& SIM_DataFactory::getEngine (  )  const

Return the SIM_Engine that owns this factory.

const UT_String& SIM_DataFactory::getSource (  )  const

Returns the name of the DSO or DLL file that defines the data type. For data types defined internally to Houdini the returned string will be empty.

SIM_Data* SIM_DataFactory::newData ( const UT_Guid uniqueid  )  const

Calls newData() to create some new data, then changes the unique id.

virtual SIM_Data* SIM_DataFactory::newData (  )  const [virtual]

Create a new instance of our particular subclass of SIM_Data.


Friends And Related Function Documentation

friend class SIM_DataFactoryCreator [friend]

Definition at line 86 of file SIM_DataFactory.h.


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

Generated on Mon Jan 28 00:29:58 2013 for HDK by  doxygen 1.5.9