VectorEntity  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
vctl::MCList< NODE_TYPE > Class Template Reference

A simple container of objects derived from MCListNode implemented as a doubly-linked list. More...

#include <mclist.h>

Inheritance diagram for vctl::MCList< NODE_TYPE >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef NODE_TYPE MT_NODE
 Node type.

Public Member Functions

NODE_TYPE * GetFirst ()
 Returns pointer to the first node in the list, NULL in case of the empty list.
NODE_TYPE * GetLast ()
 Returns pointer to the first node in the list, NULL in case of the empty list.
int GetNumber () const
 Returns the number of nodes in the list.
 MCList ()
 Default constructor.
 ~MCList ()
 An empty destructor!

Protected Member Functions

void AddNode (NODE_TYPE *new_node)
 Adds a new node at the end of the list.
void ClearAllNode ()
 Clears the list of nodes.
void EraseNode (NODE_TYPE *erase_node)
 Removes a given node from the list.

Protected Attributes

NODE_TYPE * first_node
 Pointer to the first node.
NODE_TYPE * last_node
 Pointer to the last node in the list.
int list_node_number
 Number of nodes in the list.

Detailed Description

template<typename NODE_TYPE>
class vctl::MCList< NODE_TYPE >

A simple container of objects derived from MCListNode implemented as a doubly-linked list.


Member Typedef Documentation

template<typename NODE_TYPE>
typedef NODE_TYPE vctl::MCList< NODE_TYPE >::MT_NODE

Node type.


Constructor & Destructor Documentation

template<typename NODE_TYPE>
vctl::MCList< NODE_TYPE >::MCList ( ) [inline]

Default constructor.

template<typename NODE_TYPE>
vctl::MCList< NODE_TYPE >::~MCList ( ) [inline]

An empty destructor!


Member Function Documentation

template<typename NODE_TYPE>
void vctl::MCList< NODE_TYPE >::AddNode ( NODE_TYPE *  new_node) [inline, protected]

Adds a new node at the end of the list.

template<typename NODE_TYPE>
void vctl::MCList< NODE_TYPE >::ClearAllNode ( ) [inline, protected]

Clears the list of nodes.

  • The method doesn't free any memory.
template<typename NODE_TYPE>
void vctl::MCList< NODE_TYPE >::EraseNode ( NODE_TYPE *  erase_node) [inline, protected]

Removes a given node from the list.

template<typename NODE_TYPE>
NODE_TYPE* vctl::MCList< NODE_TYPE >::GetFirst ( ) [inline]

Returns pointer to the first node in the list, NULL in case of the empty list.

template<typename NODE_TYPE>
NODE_TYPE* vctl::MCList< NODE_TYPE >::GetLast ( ) [inline]

Returns pointer to the first node in the list, NULL in case of the empty list.

template<typename NODE_TYPE>
int vctl::MCList< NODE_TYPE >::GetNumber ( ) const [inline]

Returns the number of nodes in the list.


Member Data Documentation

template<typename NODE_TYPE>
NODE_TYPE* vctl::MCList< NODE_TYPE >::first_node [protected]

Pointer to the first node.

template<typename NODE_TYPE>
NODE_TYPE* vctl::MCList< NODE_TYPE >::last_node [protected]

Pointer to the last node in the list.

template<typename NODE_TYPE>
int vctl::MCList< NODE_TYPE >::list_node_number [protected]

Number of nodes in the list.


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