DREAM::NodeList Class Reference

This is a simple map to store Nodes. More...

#include <Thread.h>

Inheritance diagram for DREAM::NodeList:

DREAM::Thread List of all members.

Public Member Functions

 NodeList ()
 Constructor.
virtual ~NodeList ()
 Destructor.
virtual void add (DREAM::Node *node_ptr)
 Adds a new Node to the list.
virtual void clear ()
 Clears contents of the map.
virtual void dequeue (DREAM::Node *node_ptr)
 Does nothing.
virtual void enqueue (DREAM::Node *node_ptr)
 Does nothing.
virtual DREAM::Nodefind (const std::string &id) const
 Returns a Node from the list.
virtual DREAM::NODE_MAPget_map ()
 Returns the whole node_map_ for manipulation.
virtual void publish () const
 Publisher.
virtual void erase (const std::string &id)
 Removes a Node from the list.
virtual void take_transitions ()
 Takes transitions for every Node in the NodeList.

Protected Attributes

DREAM::NODE_MAP node_map_
 Map to store Nodes.

Detailed Description

This is a simple map to store Nodes.

It is the base class for Thread that implements priority-based scheduling.

Definition at line 75 of file Thread.h.


Constructor & Destructor Documentation

DREAM::NodeList::NodeList (  ) 

Constructor.

Definition at line 62 of file Thread.cpp.

DREAM::NodeList::~NodeList (  )  [virtual]

Destructor.

Definition at line 66 of file Thread.cpp.


Member Function Documentation

void DREAM::NodeList::add ( DREAM::Node node_ptr  )  [inline, virtual]

Adds a new Node to the list.

Parameters:
node_ptr specifies the Node to be added.

Definition at line 70 of file Thread.cpp.

References DREAM::Node::id(), and node_map_.

Referenced by DREAM::Node::add_dependent(), DREAM::Node::deploy(), and DREAM::Node::Node().

void DREAM::NodeList::clear (  )  [inline, virtual]

Clears contents of the map.

Definition at line 75 of file Thread.cpp.

References node_map_.

virtual void DREAM::NodeList::dequeue ( DREAM::Node node_ptr  )  [inline, virtual]

Does nothing.

A nonconcurrent thread does not have an execution queue.

Reimplemented in DREAM::Thread.

Definition at line 105 of file Thread.h.

virtual void DREAM::NodeList::enqueue ( DREAM::Node node_ptr  )  [inline, virtual]

Does nothing.

A nonconcurrent thread does not have an execution queue.

Definition at line 112 of file Thread.h.

DREAM::Node * DREAM::NodeList::find ( const std::string &  id  )  const [inline, virtual]

Returns a Node from the list.

Parameters:
id specifies the id of the Node to be returned.
Returns:
pointer to the Node.

Definition at line 80 of file Thread.cpp.

References node_map_.

Referenced by DREAM::Node::get_dependent(), DREAM::Scheduler::get_thread(), and DREAM::FixedPriorityScheduler::schedule().

DREAM::NODE_MAP * DREAM::NodeList::get_map (  )  [inline, virtual]

Returns the whole node_map_ for manipulation.

Returns:
pointer to the node_map_.

Definition at line 90 of file Thread.cpp.

Referenced by DREAM::Node::get_dependent_map().

void DREAM::NodeList::publish (  )  const [inline, virtual]

Publisher.

Calls the Node::publish () function of all the Nodes in the map.

Definition at line 96 of file Thread.cpp.

References DREAM::for_each(), and node_map_.

Referenced by DREAM::Timer::publish(), and DREAM::Node::publish().

void DREAM::NodeList::erase ( const std::string &  id  )  [inline, virtual]

Removes a Node from the list.

Parameters:
id specifies the Node to be removed.

Definition at line 105 of file Thread.cpp.

Referenced by DREAM::Node::deploy(), and DREAM::Node::remove_dependent().

void DREAM::NodeList::take_transitions (  )  [inline, virtual]

Takes transitions for every Node in the NodeList.

Definition at line 122 of file Thread.cpp.


Member Data Documentation

DREAM::NODE_MAP DREAM::NodeList::node_map_ [protected]

Map to store Nodes.

Definition at line 152 of file Thread.h.

Referenced by add(), clear(), find(), publish(), and DREAM::Thread::~Thread().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 18:30:04 2007 for DREAM by  doxygen 1.5.1