#include <Thread.h>
Inheritance diagram for DREAM::NodeList:
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::Node * | find (const std::string &id) const |
Returns a Node from the list. | |
virtual DREAM::NODE_MAP * | get_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. |
It is the base class for Thread that implements priority-based scheduling.
Definition at line 75 of file Thread.h.
DREAM::NodeList::NodeList | ( | ) |
DREAM::NodeList::~NodeList | ( | ) | [virtual] |
void DREAM::NodeList::add | ( | DREAM::Node * | node_ptr | ) | [inline, virtual] |
Adds a new Node to the list.
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] |
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.
virtual void DREAM::NodeList::enqueue | ( | DREAM::Node * | node_ptr | ) | [inline, virtual] |
DREAM::Node * DREAM::NodeList::find | ( | const std::string & | id | ) | const [inline, virtual] |
Returns a Node from the list.
id | specifies the id of the Node to be returned. |
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.
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.
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] |
DREAM::NODE_MAP DREAM::NodeList::node_map_ [protected] |