VectorEntity  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions
vctl::MCQueue< KEY_TYPE, VALUE_TYPE > Class Template Reference

Sorting queue of entities. More...

#include <mcqueue.h>

Inheritance diagram for vctl::MCQueue< KEY_TYPE, VALUE_TYPE >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef MT_TYPE::iterator MT_ITER
 Iterator (see STL).
typedef MT_TYPE::reverse_iterator MT_RITER
 Reverse iterator (see STL).
typedef std::multimap
< KEY_TYPE, VALUE_TYPE * > 
MT_TYPE
 Tree implementation of the queue.

Public Member Functions

void Clear ()
 Clears the queue.
VALUE_TYPE * Exist (KEY_TYPE klic, VALUE_TYPE *entita)
 Checks if there is an identical entity in the queue.
MT_ITER GeEndIter ()
 Returns iterator after the last element in the queue.
VALUE_TYPE * GetMax ()
 Returns pointer to an entity having the maximal key, or NULL if the queue is empty.
MT_RITER GetMaxIter ()
 Returns iterator to an entity having the maximal key value.
VALUE_TYPE * GetMin ()
 Returns pointer to an entity having the minimal key, or NULL if the queue is empty.
void GetMinFirstTwo (VALUE_TYPE **first_min, VALUE_TYPE **second_min)
 Give pointers to entities having the first two minimal key, or NULL if the queue is empty.
MT_ITER GetMinIter ()
 Returns iterator to an entity having the minimal key value.
 MCQueue ()
 Default constructor.
void Sort (KEY_TYPE klic, VALUE_TYPE *entita)
 Inserts a new entity to the queue.
bool TestEndIter (MT_ITER _it)
 Returns true if a given iterator points after the last item in the queue.
bool TestEndIter (MT_RITER _it)
 Returns true if a given iterator points after the last item in the queue.
void UnSort (KEY_TYPE klic, VALUE_TYPE *entita)
 Removes a given entity from the queue.
 ~MCQueue ()
 Destructor.

Detailed Description

template<typename KEY_TYPE, typename VALUE_TYPE>
class vctl::MCQueue< KEY_TYPE, VALUE_TYPE >

Sorting queue of entities.


Member Typedef Documentation

template<typename KEY_TYPE, typename VALUE_TYPE>
typedef MT_TYPE::iterator vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::MT_ITER

Iterator (see STL).

template<typename KEY_TYPE, typename VALUE_TYPE>
typedef MT_TYPE::reverse_iterator vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::MT_RITER

Reverse iterator (see STL).

template<typename KEY_TYPE, typename VALUE_TYPE>
typedef std::multimap<KEY_TYPE, VALUE_TYPE *> vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::MT_TYPE

Tree implementation of the queue.


Constructor & Destructor Documentation

template<typename KEY_TYPE, typename VALUE_TYPE>
vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::MCQueue ( ) [inline]

Default constructor.

template<typename KEY_TYPE, typename VALUE_TYPE>
vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::~MCQueue ( ) [inline]

Destructor.


Member Function Documentation

template<typename KEY_TYPE, typename VALUE_TYPE>
void vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::Clear ( ) [inline]

Clears the queue.

  • No objects are deleted!
template<typename KEY_TYPE, typename VALUE_TYPE>
VALUE_TYPE* vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::Exist ( KEY_TYPE  klic,
VALUE_TYPE *  entita 
) [inline]

Checks if there is an identical entity in the queue.

  • Returns NULL if no such entity was found.
template<typename KEY_TYPE, typename VALUE_TYPE>
MT_ITER vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::GeEndIter ( ) [inline]

Returns iterator after the last element in the queue.

template<typename KEY_TYPE, typename VALUE_TYPE>
VALUE_TYPE* vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::GetMax ( ) [inline]

Returns pointer to an entity having the maximal key, or NULL if the queue is empty.

template<typename KEY_TYPE, typename VALUE_TYPE>
MT_RITER vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::GetMaxIter ( ) [inline]

Returns iterator to an entity having the maximal key value.

template<typename KEY_TYPE, typename VALUE_TYPE>
VALUE_TYPE* vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::GetMin ( ) [inline]

Returns pointer to an entity having the minimal key, or NULL if the queue is empty.

template<typename KEY_TYPE, typename VALUE_TYPE>
void vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::GetMinFirstTwo ( VALUE_TYPE **  first_min,
VALUE_TYPE **  second_min 
) [inline]

Give pointers to entities having the first two minimal key, or NULL if the queue is empty.

template<typename KEY_TYPE, typename VALUE_TYPE>
MT_ITER vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::GetMinIter ( ) [inline]

Returns iterator to an entity having the minimal key value.

template<typename KEY_TYPE, typename VALUE_TYPE>
void vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::Sort ( KEY_TYPE  klic,
VALUE_TYPE *  entita 
) [inline]

Inserts a new entity to the queue.

template<typename KEY_TYPE, typename VALUE_TYPE>
bool vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::TestEndIter ( MT_ITER  _it) [inline]

Returns true if a given iterator points after the last item in the queue.

template<typename KEY_TYPE, typename VALUE_TYPE>
bool vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::TestEndIter ( MT_RITER  _it) [inline]

Returns true if a given iterator points after the last item in the queue.

template<typename KEY_TYPE, typename VALUE_TYPE>
void vctl::MCQueue< KEY_TYPE, VALUE_TYPE >::UnSort ( KEY_TYPE  klic,
VALUE_TYPE *  entita 
) [inline]

Removes a given entity from the queue.


The documentation for this class was generated from the following file: