MeVisLab Toolbox Reference
|
Base object class XMarkerList (derived from BaseListTemplate) specialized for XMarker items. More...
#include <mlXMarkerList.h>
Public Member Functions | |
XMarkerList () | |
Constructor, enables persistence. More... | |
![]() | |
BaseListTemplate< XMarker > & | operator= (const BaseListTemplate &other)=default |
explicitly create default assignment operator More... | |
BaseItem * | getItemAt (MLssize_t index) override |
This virtual function is reimplemented from ListBase, where it returns 0 in any case (also in ListTemplate<T>, because the items are not necessarily BaseItems there). More... | |
const BaseItem * | getConstItemAt (MLssize_t index) const override |
Same as getItemAt(MLssize_t index) for constant access. More... | |
void | insertItemAt (MLssize_t index, const BaseItem *item) override |
This virtual function is reimplemented from ListBase, where it does nothing at all. More... | |
void | modifyItemAt (MLssize_t index, const BaseItem *item) override |
This virtual function is reimplemented from ListBase, where it does nothing at all. More... | |
void | deleteItemAt (MLssize_t index) override |
This virtual function is reimplemented from ListBase, where it does nothing at all. More... | |
void | selectItemAt (MLssize_t index) override |
This virtual function is reimplemented from ListBase, where it does nothing at all. More... | |
const RuntimeType * | getItemTypeId () const override |
This virtual function is reimplemented from ListBase, where it returns 0 in any case (also in ListTemplate<T>, because the items are not necessarily BaseItems there). More... | |
void | clearList () override |
Clear complete list. More... | |
BaseListTemplate () | |
Standard constructor, disables persistence. More... | |
BaseListTemplate (bool persistance) | |
Special constructor to explicitly enable/disable persistence. More... | |
BaseListTemplate (const BaseListTemplate &other) | |
virtual MLssize_t | newId () |
Get new unused id. More... | |
virtual void | usedId (MLssize_t id) |
Notify list that id is used. More... | |
virtual void | resetId () |
Reset next id. More... | |
virtual void | doDeleteItem (MLssize_t index) |
Delete single item at position index and set the corresponding ActDelete action. More... | |
virtual void | doInsertItem (MLssize_t index, const XMarker &item) |
Insert item at position index, assign a new id value to the inserted item and set the corresponding ActInsert action. More... | |
virtual void | doModifyItem (MLssize_t index, const XMarker &item) |
Store item at position index and set the corresponding ActModify action. More... | |
virtual void | doSelectItem (MLssize_t index) |
Select item at position index, or deselect if item == -1, and set the corresponding ActSelect action. More... | |
virtual void | appendItem (const XMarker &item) |
Appends an item to the list. More... | |
void | addStateToTree (TreeNode *parent) const override |
Attaches the object state as children of the given parent node. More... | |
ML_SET_ADDSTATE_VERSION (1) | |
Set addState version number. More... | |
void | readStateFromTree (TreeNode *parent) override |
Reads the object state from the children of the given parent node. More... | |
![]() | |
ListTemplate () | |
Standard constructor, disables persistence. More... | |
ListTemplate (bool persistance) | |
Special constructor to explicitly enable/disable persistence. More... | |
ListTemplate (const ListTemplate &other) | |
size_t | getSize () const override |
Get number of list elements. More... | |
ListTemplate< T > & | operator= (const ListTemplate< T > &list) |
Assignment operator. More... | |
ListTemplate< T > * | clone () const override |
Create a copy of (*this) using the ML runtime system and the '='-operator. More... | |
ListTemplate< T > * | deepCopy () const override |
Create a deep copy of the list. More... | |
std::string | persistentState () const override |
Returns a string describing the object's internal state. More... | |
void | setPersistentState (const std::string &state) override |
Initialize the list object from the string state. More... | |
ML_SET_ADDSTATE_VERSION (2) | |
Set addState version number, version 2 indicates data saved by a 64 bit version. More... | |
![]() | |
ListBase (bool persistance) | |
Constructor. Derived class should indicate whether persistence is implemented. More... | |
ListBase (const ListBase &other) | |
virtual void | setAction (ActionClass actionClass, MLssize_t id, MLssize_t index) |
Set actionClass, affected item id and index. More... | |
virtual void | setAction (ActionClass actionClass) |
Set actionClass for actions affecting the whole list. More... | |
virtual void | getAction (ActionClass &actionClass, MLssize_t &id, MLssize_t &index) const |
Get actionClass, affected item id and index. More... | |
virtual ActionClass | getActionClass () const |
Get actionClass of last action. More... | |
virtual MLssize_t | getActionId () const |
Get id of item affected by last action. More... | |
virtual MLssize_t | getActionIndex () const |
Get index of item affected by last action. More... | |
virtual MLssize_t | getCurrentIndex () const |
Get index of currently selected item, or -1 if no item selected. More... | |
virtual bool | isModified () const |
Tests, if the last action has been an action that has modified the content of the list. More... | |
virtual bool | hasPersistance () const |
Test if persistence is available and enabled. More... | |
virtual void | setPersistance (bool persistance) |
Enable/disable persistence functionality. More... | |
ML_SET_ADDSTATE_VERSION (0) | |
Set addState version number. More... | |
![]() | |
Base () | |
Constructor. More... | |
virtual | ~Base () |
Destructor. More... | |
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. More... | |
virtual bool | isRefCountedBase () const |
Returns whether the instance is derived from RefCountedBase. More... | |
virtual std::string | detailString () const |
Returns a string describing this object. More... | |
virtual bool | implementsPersistence (PersistenceInterface) const |
Override this method to declare which persistence interfaces are implemented by your derived class. More... | |
virtual void | writeTo (AbstractPersistenceOutputStream *) const |
Writes the objects state to the data stream object. More... | |
virtual void | readFrom (AbstractPersistenceInputStream *, int) |
Reads the objects state from the data stream object. More... | |
Additional Inherited Members | |
![]() | |
typedef T | itemType |
Declare type name for item type (this allows declarations like: ObjectList::itemType obj) More... | |
![]() | |
enum | ActionClass { ActNone = 0 , ActUnknown , ActNew , ActSelect , ActModify , ActDelete , ActInsert , ActInsertOvw , ActNumActions } |
Constants to describe the type of action most recently performed. More... | |
![]() | |
enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } |
This enum describes the different persistence interfaces available. More... | |
![]() | |
static const char *const | ActionClassNames [ActNumActions] |
Action class name constants. More... | |
![]() | |
std::string | itemState (typename ListTemplate< XMarker >::const_iterator it) const override |
void | setItemState (typename ListTemplate< XMarker >::iterator it, const std::string &state) override |
Initialize the item object from the string state. More... | |
![]() | |
virtual std::string | itemState ([[maybe_unused]] typename ListTemplate< T >::const_iterator it) const |
Return a string representation of the item object. More... | |
virtual void | setItemState (typename ListTemplate< T >::iterator, const std::string &) |
Initialize the item object from the string state. More... | |
![]() | |
char * | newString (const std::string &str) const |
Convenience method to create a copy of the string str allocated on the heap. More... | |
void | deleteString (char *str) const |
Dispose a string allocated with newString() More... | |
ListBase & | operator= (const ListBase &list) |
Assignment operator, used in derived list classes. More... | |
Base object class XMarkerList (derived from BaseListTemplate) specialized for XMarker items.
List class for XMarker items
Definition at line 166 of file mlXMarkerList.h.
|
inline |
Constructor, enables persistence.
Definition at line 171 of file mlXMarkerList.h.