|
| CMappedMultiLevelList () |
|
virtual | ~CMappedMultiLevelList () |
|
virtual T * | create (const Idx &arg_idx, const T &arg_node2add, const std::size_t arg_priority) |
|
virtual T * | create (const Idx &arg_idx, const std::size_t arg_priority) |
|
virtual T * | insert (const Idx &arg_idx, T *arg_node2add, const std::size_t arg_priority) |
|
virtual CMappedMultiLevelList
< Idx, T > & | operator= (const CMappedMultiLevelList< Idx, T > &arg_rhs) |
|
virtual bool | erase (T *arg_t) |
|
virtual bool | erase (const Idx &arg_idx) |
|
virtual bool | clear () |
|
std::vector< T * > * | getSinglePriorityLevel (std::size_t arg_pri) |
|
std::size_t | getNumPriorityLevels () const |
|
int | getPriorityLevel (T *arg_t) |
|
int | getPriorityLevel (const Idx &arg_idx) |
|
bool | operator== (const CMappedList< Idx, T > &rhs) |
|
bool | operator!= (const CMappedList< Idx, T > &rhs) |
|
void | swap (CMappedList< Idx, T > &arg_swap_obj) |
|
virtual T * | create (const Idx &arg_idx, const bool insert_at_start=true) |
|
virtual T * | create (const Idx &arg_idx, const T &arg_t, const bool insert_at_start=true) |
|
virtual T * | insert (const Idx &arg_idx, T *arg_t, const bool insert_at_start=true) |
|
virtual T * | at (const std::size_t arg_idx) |
|
virtual T * | at (const Idx &arg_idx) |
|
virtual const Idx * | getIndexAt (const std::size_t arg_idx) const |
|
virtual int | getIndexNumericAt (const Idx &arg_idx) const |
|
virtual int | getIndexNumericAt (const T *const arg_node) const |
|
virtual const T * | at_const (const std::size_t arg_idx) const |
|
virtual const T * | at_const (const Idx &arg_idx) const |
|
virtual std::size_t | size () const |
|
virtual bool | empty () const |
|
virtual T * | operator[] (const std::size_t arg_idx) |
|
iterator | begin () |
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
virtual bool | sort (const std::vector< Idx > &arg_order) |
|
virtual bool | sort_get_order (std::vector< Idx > &ret_order) const |
|
virtual bool | isSorted () const |
|
template<typename Idx, typename T>
class sutil::CMappedMultiLevelList< Idx, T >
This template class contains a multi level linked list.
It is an extension of a PileMap, which itself is a collection of pointers (memory managed) stored in a linked list.
template<typename Idx, typename T >
T * sutil::CMappedList< Idx, T >::create |
( |
const Idx & |
arg_idx, |
|
|
const bool |
insert_at_start = true |
|
) |
| |
|
virtualinherited |
Example usage: first.assign (7,100); // 7 ints with value 100 second.assign (first.begin(),first.end()); // a copy of first ******************************* The mapped list specific methods
Creates an element, inserts an element into the list and returns the pointer
Reimplemented in sutil::CMappedTree< TIdx, TNode >, sutil::CMappedTree< std::string, scl::SRigidBodyDyn >, sutil::CMappedTree< std::string, scl::SRigidBody >, and sutil::CMappedTree< std::string, scl::SGraphicsChaiRigidBody >.
template<typename Idx, typename T>
T * sutil::CMappedList< Idx, T >::create |
( |
const Idx & |
arg_idx, |
|
|
const T & |
arg_t, |
|
|
const bool |
insert_at_start = true |
|
) |
| |
|
virtualinherited |
Copies the given element, inserts the copied element into the list and returns the pointer to the copied element.
By default inserts element at the start/begin() position. If specified, flag is false, inserts at the end of the list.
If size is zero, insert at start/end doesn't matter.
Reimplemented in sutil::CMappedTree< TIdx, TNode >, sutil::CMappedTree< std::string, scl::SRigidBodyDyn >, sutil::CMappedTree< std::string, scl::SRigidBody >, and sutil::CMappedTree< std::string, scl::SGraphicsChaiRigidBody >.
template<typename Idx, typename T>
These functions exist in the parent class, but are not to be called by pointers to this class. The overloaded equivalents in this class are the replacements. For more information, read the documentation related to -Woverloaded-virtual
NOTE TODO : This needs to be protected here. T* CMappedList<Idx,T>::create(const Idx & arg_idx, const bool insert_at_start); Copy-Constructor : Does a deep copy of the mapped multi level list to get a new one. NOTE : This uses the passed mapped list's iterator construct.
Set the current mapped list to the new mapped list
template<typename Idx, typename T >
Returns the numeric index at the given typed index in the linked list
NOTE : The index starts at 0. Returns -1 if node not found.
Returns the numeric index at the given typed index in the linked list
template<typename Idx, typename T>
Returns the numeric index at the given typed index in the linked list
NOTE : The index starts at 0. Returns -1 if node not found.
Returns the numeric index at the given typed index in the linked list
template<typename Idx, typename T>
T * sutil::CMappedList< Idx, T >::insert |
( |
const Idx & |
arg_idx, |
|
|
T * |
arg_t, |
|
|
const bool |
insert_at_start = true |
|
) |
| |
|
virtualinherited |
Inserts the given object into the list and returns the pointer to the copied element. NOTE : The recommended method is to use create. Else the object memory deallocation might be ambiguous. Remember that the mapped list "always" clears its own data.
By default inserts element at the start/begin() position. If specified, flag is false, inserts at the end of the list.
If size is zero, insert at start/end doesn't matter.
Reimplemented in sutil::CMappedTree< TIdx, TNode >, sutil::CMappedTree< std::string, scl::SRigidBodyDyn >, sutil::CMappedTree< std::string, scl::SRigidBody >, and sutil::CMappedTree< std::string, scl::SGraphicsChaiRigidBody >.
template<typename Idx, typename T >
Sorting related functions
Sorts the list so that iterator access matches the given vector's index. Ie. Given indices 0 to n in the vector, the begin() iterator will match 0, and the end() will appear after iterating over n.
Any create/erase/swap etc. function call will invalidate the sort ordering.
Sorting type : Insertion Sort.