ml::Base Class Reference

Class representing general ML objects that support import/export via strings (setPersistentState() and getPersistentState()) or arbitrary tree structures (using addStateToTree() and readStateFromTree()). More...

#include <mlBase.h>

Inheritance diagram for ml::Base:

ml::BaseItem ml::BitImage ml::CSOList ml::CSOProcessorData ml::CSOVoxelSetList ml::CurveData ml::CurveList ml::DataCompressor ml::DataCompressorFactory ml::DcmtkBase ml::DiscList ml::FieldContainer ml::ITKWrapperBase ml::ListBase ml::LUTFunction ml::MarkerList ml::MLVTKParentWrapper ml::MultiBaseType ml::omObject ml::omObjectContainer ml::omObjMgrConnection ml::PointList ml::RasterFunction ml::RasterFunctionList ml::RefCountedBase ml::SphereList ml::StylePalette ml::VectorList ml::VTKWrapperBase ml::WEM

List of all members.

Public Member Functions

 Base ()
 Constructor.
virtual ~Base ()
 Destructor.
virtual char * getPersistentState () const
 Returns a C string describing the object's internal state.
virtual void setPersistentState (const char *)
 Restores the object's internal state from a string that had been previously generated using getPersistentState().
virtual void clearPersistentState (char *) const
 Disposes a string previously allocated by getPersistentState().
virtual void addStateToTree (TreeNode *) const
 Attaches the object state as children of the given parent node.
virtual void readStateFromTree (TreeNode *)
 Reads the object state from the children of the given parent node.
 ML_SET_ADDSTATE_VERSION (0)
 Set addStateToTree version number that can be accessed via getAddStateVersion().
virtual BasedeepCopy () const
 Creates a deep copy of the given object.
bool isOfAllowedType (const std::vector< const RuntimeType * > &types) const
 Check if this object's type is equal to or derived from one of the types given in the argument.
virtual bool isRefCountedBase () const
 Returns if the instance is derived from RefCountedBase.


Detailed Description

Class representing general ML objects that support import/export via strings (setPersistentState() and getPersistentState()) or arbitrary tree structures (using addStateToTree() and readStateFromTree()).

Objects of class Base

Remark: This class is base class for Module and all derived modules.

Definition at line 49 of file mlBase.h.


Constructor & Destructor Documentation

ml::Base::Base (  ) 

Constructor.

virtual ml::Base::~Base (  )  [virtual]

Destructor.


Member Function Documentation

virtual void ml::Base::addStateToTree ( TreeNode  )  const [inline, virtual]

virtual void ml::Base::clearPersistentState ( char *   )  const [inline, virtual]

virtual Base* ml::Base::deepCopy (  )  const [inline, virtual]

Creates a deep copy of the given object.

The default implementation returns a NULL pointer and has to be overloaded by derived classes. It can be used to clone Base objects without knowledge of the exact type of object.

Reimplemented in ml::BaseItem, ml::BaseList, ml::CurveData, ml::ListBase, ml::ListTemplate< T >, ml::CSOList, ml::ListTemplate< KeyFrame >, ml::ListTemplate< Matrix3 >, ml::ListTemplate< T >, ml::ListTemplate< Matrix4 >, ml::ListTemplate< BaseItem >, ml::ListTemplate< vec6i >, ml::ListTemplate< Vector6 >, ml::ListTemplate< vec4i >, ml::ListTemplate< vec3i >, ml::ListTemplate< BaseContainerItem >, ml::ListTemplate< Vector3 >, ml::ListTemplate< Vector4 >, and ml::ListTemplate< XMarker >.

Definition at line 84 of file mlBase.h.

virtual char* ml::Base::getPersistentState (  )  const [inline, virtual]

bool ml::Base::isOfAllowedType ( const std::vector< const RuntimeType * > &  types  )  const

Check if this object's type is equal to or derived from one of the types given in the argument.

This method will also return true if the vector is empty, since this denotes that any type is allowed.

virtual bool ml::Base::isRefCountedBase (  )  const [inline, virtual]

Returns if the instance is derived from RefCountedBase.

Reimplemented in ml::RefCountedBase.

Definition at line 92 of file mlBase.h.

ml::Base::ML_SET_ADDSTATE_VERSION (  ) 

Set addStateToTree version number that can be accessed via getAddStateVersion().

Reimplemented in ml::BaseItem, ml::BaseContainerItem, ml::ListBase, ml::StylePalette, and ml::XMarker.

virtual void ml::Base::readStateFromTree ( TreeNode  )  [inline, virtual]

virtual void ml::Base::setPersistentState ( const char *   )  [inline, virtual]


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

Generated on Sat Sep 3 18:39:37 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8