|
Jameo Core Library
|
This class provides a linked list including undo management. More...
Public Member Functions | |
| LinkedList (Object *owner) | |
| Constructor for the LinkedList. Initializes all variables. | |
| ~LinkedList () override | |
| Destructor for the linked list. This function deletes all variables. | |
| bool | hasNext () const |
| This method returns true if there is a next element in the list. | |
| Object * | next () |
| Iterates to the next element in the list and returns the current one. The next element can be NULL, but then hasNext() will return false. | |
| Object * | first () const |
| Returns the first element of the list. | |
| Object * | last () const |
| Returns the last element of the list. | |
| void | rewind () |
| void | clear (UndoManager *um) |
| void | add (Object *data, UndoManager *um) |
| void | addBefore (const Object *addBeforeThis, Object *itemToAdd, UndoManager *um) |
| Status | remove (const Object *data, UndoManager *um) |
| removes the element from the list. | |
| void | swapData (Object *data1, Object *data2, UndoManager *um) |
| size_t | size () const |
| Returns the number of entries in this list. | |
| LinkedListIterator | iterator () const |
| jm::String | displayName () const override |
| Returns the display name of the object intended to present to a user. | |
Public Member Functions inherited from jm::Object | |
| Object () noexcept | |
| Constructor. | |
| virtual | ~Object () noexcept |
| Destructor. | |
| void | release () noexcept |
| Decreases the reference counter and releases the object immediately when the reference counter becomes 0. | |
| Object * | retain () noexcept |
| Increases the reference counter of this object by 1. | |
| Object * | autorelease () noexcept |
| Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object. | |
| int32 | referenceCount () const noexcept |
| Returns the value of the reference counter. | |
| virtual bool | equals (const Object *other) const |
| Comparison of objects. | |
| virtual void | printDiffInfo (DiffOperation operation, Object *other) const |
| Output method for outputting the diff results for the diff algorithm. | |
| void | setHighBit (bool status) noexcept |
| bool | highBit () const noexcept |
Friends | |
| class | LinkedListIterator |
This class provides a linked list including undo management.
|
explicit |
Constructor for the LinkedList. Initializes all variables.
| owner | The owner of the list. Ideally an Editable object. This object may receive regenerate events during undo steps. |
|
override |
Destructor for the linked list. This function deletes all variables.
| void jm::LinkedList::add | ( | Object * | data, |
| UndoManager * | um | ||
| ) |
| void jm::LinkedList::addBefore | ( | const Object * | addBeforeThis, |
| Object * | itemToAdd, | ||
| UndoManager * | um | ||
| ) |
| void jm::LinkedList::clear | ( | UndoManager * | um | ) |
|
overridevirtual |
Returns the display name of the object intended to present to a user.
This method should be implemented by objects that want to present the name of the object to the user of an application. For example the diff-algorithm uses this or also the dwg objects.
Reimplemented from jm::Object.
| Object * jm::LinkedList::first | ( | ) | const |
Returns the first element of the list.
| bool jm::LinkedList::hasNext | ( | ) | const |
This method returns true if there is a next element in the list.
| LinkedListIterator jm::LinkedList::iterator | ( | ) | const |
| Object * jm::LinkedList::last | ( | ) | const |
Returns the last element of the list.
| Object * jm::LinkedList::next | ( | ) |
Iterates to the next element in the list and returns the current one. The next element can be NULL, but then hasNext() will return false.
| Status jm::LinkedList::remove | ( | const Object * | data, |
| UndoManager * | um | ||
| ) |
removes the element from the list.
| void jm::LinkedList::rewind | ( | ) |
| size_t jm::LinkedList::size | ( | ) | const |
Returns the number of entries in this list.
| void jm::LinkedList::swapData | ( | Object * | data1, |
| Object * | data2, | ||
| UndoManager * | um | ||
| ) |
|
friend |