#include <mlBaseList.h>

Public Member Functions | |
| virtual BaseContainerItem & | operator= (const BaseContainerItem &other) |
| Assignment operator. | |
| virtual BaseContainerItem & | copyFrom (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 BaseContainerItem * | toBaseContainerItem (Base &baseObj, MLssize_t id=0, const char *name=NULL) |
| Returns baseObj, if baseObj already is a BaseContainerItem. | |
Public Attributes | |
| Base * | baseObjectP |
| Pointer to the actual object:. | |
Definition at line 53 of file mlBaseList.h.
| ml::BaseContainerItem::BaseContainerItem | ( | ) | [inline] |
| 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] |
| virtual ml::BaseContainerItem::~BaseContainerItem | ( | ) | [inline, virtual] |
Definition at line 85 of file mlBaseList.h.
| virtual void ml::BaseContainerItem::addStateToTree | ( | TreeNode * | parent | ) | const [virtual] |
| 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 | ( | 0 | ) |
| bool ml::BaseContainerItem::operator< | ( | const BaseContainerItem & | ) | const [inline] |
| 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] |
| virtual void ml::BaseContainerItem::readStateFromTree | ( | TreeNode * | parent | ) | [virtual] |
| virtual void ml::BaseContainerItem::setPersistentState | ( | const char * | state | ) | [virtual] |
| 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.
1.5.8