#include <mlBaseItem.h>

Public Member Functions | |
| void | setId (MLssize_t id) |
| Sets the id of the item. | |
| MLssize_t | getId () const |
| Sets the id of the item. | |
| virtual | ~BaseItem () |
| Destructor. | |
| virtual BaseItem & | operator= (const BaseItem &item) |
| Assignment operator. | |
| bool | operator< (const BaseItem &) const |
| Dummy "lesser than operator", required for VC7. | |
| bool | operator== (const BaseItem &) const |
| Dummy "equal operator", required for VC7. | |
| const char * | name () const |
| Get name. | |
| void | setName (const char *newName) |
| Set name, object stores a copy. | |
| virtual BaseItem * | deepCopy () const |
| Create a deep copy of the BaseItem. | |
Constructors | |
| BaseItem () | |
| Default constructor. | |
| BaseItem (MLssize_t id, const char *nameStr=NULL) | |
| ID and name. | |
| BaseItem (const BaseItem &item) | |
| Copy constructor. | |
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. | |
Protected Member Functions | |
| char * | newString (const std::string &str) const |
| Convenience method to create a copy of the string str allocated on the heap. | |
| void | deleteString (char *str) const |
| Dispose a string allocated with newString(). | |
Definition at line 37 of file mlBaseItem.h.
| ml::BaseItem::BaseItem | ( | ) | [inline] |
| ml::BaseItem::BaseItem | ( | MLssize_t | id, | |
| const char * | nameStr = NULL | |||
| ) | [inline] |
| ml::BaseItem::BaseItem | ( | const BaseItem & | item | ) | [inline] |
| virtual ml::BaseItem::~BaseItem | ( | ) | [inline, virtual] |
| virtual void ml::BaseItem::addStateToTree | ( | TreeNode * | parent | ) | const [virtual] |
Attaches the object state as children of the given parent node.
Reimplemented from ml::Base.
Reimplemented in ml::BaseContainerItem, and ml::XMarker.
| virtual void ml::BaseItem::clearPersistentState | ( | char * | state | ) | const [virtual] |
Dispose the string state, which has been previously obtained by getPersistentState().
Reimplemented from ml::Base.
Reimplemented in ml::BaseContainerItem.
| virtual BaseItem* ml::BaseItem::deepCopy | ( | ) | const [inline, virtual] |
Create a deep copy of the BaseItem.
Reimplemented from ml::Base.
Definition at line 112 of file mlBaseItem.h.
| void ml::BaseItem::deleteString | ( | char * | str | ) | const [protected] |
Dispose a string allocated with newString().
| MLssize_t ml::BaseItem::getId | ( | void | ) | const [inline] |
Sets the id of the item.
Definition at line 59 of file mlBaseItem.h.
Referenced by ml::ListContainerTemplate< T >::updatePropertyFields().
| virtual char* ml::BaseItem::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::Base.
Reimplemented in ml::BaseContainerItem, and ml::XMarker.
| ml::BaseItem::ML_SET_ADDSTATE_VERSION | ( | 0 | ) |
Set addState version number.
Version History: 0 : adding size and items only 1 : also adding ListBase members (hasPersistence, currentItem);
Reimplemented from ml::Base.
Reimplemented in ml::BaseContainerItem, and ml::XMarker.
| const char* ml::BaseItem::name | ( | ) | const [inline] |
Get name.
Definition at line 76 of file mlBaseItem.h.
Referenced by ml::ListContainerTemplate< T >::updatePropertyFields().
| char* ml::BaseItem::newString | ( | const std::string & | str | ) | const [protected] |
Convenience method to create a copy of the string str allocated on the heap.
This avoids passing STL strings between modules, which fails in Windows due to a bug in the VC++ implementation of the STL.
| bool ml::BaseItem::operator< | ( | const BaseItem & | ) | const [inline] |
| bool ml::BaseItem::operator== | ( | const BaseItem & | ) | const [inline] |
| virtual void ml::BaseItem::readStateFromTree | ( | TreeNode * | parent | ) | [virtual] |
Reads the object state from the children of the given parent node.
Reimplemented from ml::Base.
Reimplemented in ml::BaseContainerItem, and ml::XMarker.
| void ml::BaseItem::setId | ( | MLssize_t | id | ) | [inline] |
| void ml::BaseItem::setName | ( | const char * | newName | ) |
| virtual void ml::BaseItem::setPersistentState | ( | const char * | state | ) | [virtual] |
Initialize the item object from the string state.
Reimplemented from ml::Base.
Reimplemented in ml::BaseContainerItem, and ml::XMarker.
1.5.8