| 
    MeVisLab Toolbox Reference
    
   | 
 
General Base object class for list items that have an id and a name. More...
#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.   | |
| ~BaseItem () override | |
| Destructor.   | |
| BaseItem & | operator= (const BaseItem &item) | 
| Assignment operator.   | |
| const char * | name () const | 
| Get name.   | |
| void | setName (const char *newName) | 
| Set name, object stores a copy.   | |
| BaseItem * | deepCopy () const override | 
| Create a deep copy of the BaseItem.   | |
Constructors  | |
| BaseItem () | |
| Default constructor.   | |
| BaseItem (MLssize_t id, const char *nameStr=nullptr) | |
| ID and name.   | |
| BaseItem (const BaseItem &item) | |
| Copy constructor.   | |
Persistence  | |
| std::string | persistentState () const override | 
| Return a string representation of the item object.   | |
| void | setPersistentState (const std::string &state) override | 
| Initialize the item object from the string state.   | |
| void | addStateToTree (TreeNode *parent) const override | 
| Attaches the object state as children of the given parent node.   | |
| ML_SET_ADDSTATE_VERSION (0) | |
| Set addState version number.   | |
| void | readStateFromTree (TreeNode *parent) override | 
| Reads the object state from the children of the given parent node.   | |
| void | writeTo (AbstractPersistenceOutputStream *stream) const override | 
| write state to stream   | |
| void | readFrom (AbstractPersistenceInputStream *stream, int version) override | 
| read state from stream   | |
  Public Member Functions inherited from ml::Base | |
| Base () | |
| Constructor.   | |
| virtual | ~Base () | 
| Destructor.   | |
| bool | isOfAllowedType (const std::vector< const RuntimeType * > &types) const | 
| Checks whether this object's type is equal to or derived from one of the types given in the argument.   | |
| virtual bool | isRefCountedBase () const | 
| Returns whether the instance is derived from RefCountedBase.   | |
| virtual std::string | detailString () const | 
| Returns a string describing this object.   | |
| virtual bool | implementsPersistence (PersistenceInterface) const | 
| Override this method to declare which persistence interfaces are implemented by your derived class.   | |
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()   | |
Additional Inherited Members | |
  Public Types inherited from ml::Base | |
| enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } | 
| This enum describes the different persistence interfaces available.  More... | |
General Base object class for list items that have an id and a name.
Definition at line 37 of file mlBaseItem.h.
      
  | 
  inline | 
Default constructor.
Definition at line 45 of file mlBaseItem.h.
      
  | 
  inlineoverride | 
Destructor.
Definition at line 62 of file mlBaseItem.h.
Attaches the object state as children of the given parent node.
Reimplemented from ml::Base.
Reimplemented in ml::XMarker.
      
  | 
  inlineoverridevirtual | 
Create a deep copy of the BaseItem.
Reimplemented from ml::Base.
Definition at line 107 of file mlBaseItem.h.
Dispose a string allocated with newString()
      
  | 
  inline | 
Sets the id of the item.
Definition at line 59 of file mlBaseItem.h.
| 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);
Get name.
Definition at line 70 of file mlBaseItem.h.
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.
      
  | 
  overridevirtual | 
Return a string representation of the item object.
Reimplemented from ml::Base.
Reimplemented in ml::XMarker.
      
  | 
  overridevirtual | 
read state from stream
Reimplemented from ml::Base.
Reads the object state from the children of the given parent node.
Reimplemented from ml::Base.
Reimplemented in ml::XMarker.
Sets the id of the item.
Definition at line 56 of file mlBaseItem.h.
Referenced by ml::ListContainerTemplate< T >::insertItem().
Set name, object stores a copy.
Referenced by ml::XMarker::XMarker(), and ml::XMarker::XMarker().
Initialize the item object from the string state.
Reimplemented from ml::Base.
Reimplemented in ml::XMarker.
      
  | 
  overridevirtual | 
write state to stream
Reimplemented from ml::Base.