ml::BaseContainerItem Class Reference

Base object class BaseContainerItem encapsulates a pointer to a Base object as a list item. More...

#include <mlBaseList.h>

Inheritance diagram for ml::BaseContainerItem:

ml::BaseItem ml::Base

List of all members.

Public Member Functions

virtual BaseContainerItemoperator= (const BaseContainerItem &other)
 Assignment operator.
virtual BaseContainerItemcopyFrom (const BaseContainerItem &other, bool copyObjectAsWell=true)
 Copies from other.
Constructors
 BaseContainerItem ()
 Default constructor.
 BaseContainerItem (MLssize_t idParam, const char *nameParam=0, Base *baseP=0)
 When assigning a base object, you should also provide a name.
 BaseContainerItem (const BaseContainerItem &other)
 Copy constructor.
bool operator< (const BaseContainerItem &) const
 Dummy "lesser than operator", required for VC7.
bool operator== (const BaseContainerItem &) const
 Dummy "equal operator", required for VC7.
Destructor
virtual ~BaseContainerItem ()
Persistence
virtual char * getPersistentState () const
 Return a string representation of the item object.
virtual void setPersistentState (const char *state)
 Initialize the item object from the string state.
virtual void clearPersistentState (char *state) const
 Dispose the string state, which has been previously obtained by getPersistentState().
virtual void addStateToTree (TreeNode *parent) const
 Attaches the object state as children of the given parent node.
 ML_SET_ADDSTATE_VERSION (0)
 Set addState version number.
virtual void readStateFromTree (TreeNode *parent)
 Reads the object state from the children of the given parent node.

Static Public Member Functions

static BaseContainerItemtoBaseContainerItem (Base &baseObj, MLssize_t id=0, const char *name=NULL)
 Returns baseObj, if baseObj already is a BaseContainerItem.

Public Attributes

BasebaseObjectP
 Pointer to the actual object:.


Detailed Description

Base object class BaseContainerItem encapsulates a pointer to a Base object as a list item.

Definition at line 53 of file mlBaseList.h.


Constructor & Destructor Documentation

ml::BaseContainerItem::BaseContainerItem (  )  [inline]

Default constructor.

Definition at line 64 of file mlBaseList.h.

ml::BaseContainerItem::BaseContainerItem ( MLssize_t  idParam,
const char *  nameParam = 0,
Base baseP = 0 
) [inline]

When assigning a base object, you should also provide a name.

Definition at line 67 of file mlBaseList.h.

ml::BaseContainerItem::BaseContainerItem ( const BaseContainerItem other  )  [inline]

Copy constructor.

Definition at line 71 of file mlBaseList.h.

virtual ml::BaseContainerItem::~BaseContainerItem (  )  [inline, virtual]

Definition at line 85 of file mlBaseList.h.


Member Function Documentation

virtual void ml::BaseContainerItem::addStateToTree ( TreeNode parent  )  const [virtual]

Attaches the object state as children of the given parent node.

Reimplemented from ml::BaseItem.

virtual void ml::BaseContainerItem::clearPersistentState ( char *  state  )  const [virtual]

Dispose the string state, which has been previously obtained by getPersistentState().

Reimplemented from ml::BaseItem.

virtual BaseContainerItem& ml::BaseContainerItem::copyFrom ( const BaseContainerItem other,
bool  copyObjectAsWell = true 
) [virtual]

Copies from other.

If copyObjectAsWell, it is also doing a copy of the object contained, including a previous deletion of the current object pointer. Otherwise, only the pointer will be copied.

virtual char* ml::BaseContainerItem::getPersistentState (  )  const [virtual]

Return a string representation of the item object.

The string is allocated on the heap and is later disposed by clearPersistentState().

Reimplemented from ml::BaseItem.

ml::BaseContainerItem::ML_SET_ADDSTATE_VERSION (  ) 

Set addState version number.

Reimplemented from ml::BaseItem.

bool ml::BaseContainerItem::operator< ( const BaseContainerItem  )  const [inline]

Dummy "lesser than operator", required for VC7.

Definition at line 74 of file mlBaseList.h.

virtual BaseContainerItem& ml::BaseContainerItem::operator= ( const BaseContainerItem other  )  [virtual]

Assignment operator.

Copies only the base object pointer! If this is not what you want, use copyFrom(X, true) instead.

bool ml::BaseContainerItem::operator== ( const BaseContainerItem  )  const [inline]

Dummy "equal operator", required for VC7.

Definition at line 77 of file mlBaseList.h.

virtual void ml::BaseContainerItem::readStateFromTree ( TreeNode parent  )  [virtual]

Reads the object state from the children of the given parent node.

Reimplemented from ml::BaseItem.

virtual void ml::BaseContainerItem::setPersistentState ( const char *  state  )  [virtual]

Initialize the item object from the string state.

Reimplemented from ml::BaseItem.

static BaseContainerItem* ml::BaseContainerItem::toBaseContainerItem ( Base baseObj,
MLssize_t  id = 0,
const char *  name = NULL 
) [static]

Returns baseObj, if baseObj already is a BaseContainerItem.

If not, an item containing baseObj is created using new(). Returns NULL if object creation failed.


Member Data Documentation

Pointer to the actual object:.

Definition at line 58 of file mlBaseList.h.


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

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