|
SyDEVS
v0.7
Simulation-based analysis of complex systems involving people, devices, physical elements, and dynamic environments.
|
A base class for the collection node class template. More...
#include <collection_node_base.h>
Inherits sydevs::systems::system_node.
Inherited by sydevs::systems::collection_node< AgentID, Node >.
Public Member Functions | |
| virtual | ~collection_node_base ()=default |
| Destructor. More... | |
| data_mode | node_dmode () const |
Returns message for all collection nodes. More... | |
Public Member Functions inherited from sydevs::systems::system_node | |
| system_node (const system_node &)=delete | |
| No copy constructor. More... | |
| system_node & | operator= (const system_node &)=delete |
| No copy assignment. More... | |
| system_node (system_node &&)=delete | |
| No move constructor. More... | |
| system_node & | operator= (system_node &&)=delete |
| No move assignment. More... | |
| virtual | ~system_node ()=default |
| Destructor More... | |
| const std::string & | node_name () const |
| Returns the name of the node. More... | |
| const std::string & | full_name () const |
| Returns the full name of the node, including parent nodes. More... | |
| int64 | node_index () const |
| Returns the index of the node within the parent node. More... | |
| const node_interface & | external_interface () const |
| Returns the object responsible for exchanging information between the node and its surrounding context. More... | |
| const timer & | event_timer () const |
| Returns the object that accumulated wallclock event durations. More... | |
| template<typename T > | |
| void | print (const T &X) |
Prints X while indicating the simulation time and node. More... | |
| void | print (const char *raw_text) |
Prints raw_text while indicating the simulation time and node. More... | |
| void | print (const std::string &text) |
Prints text while indicating the simulation time and node. More... | |
| void | print_on_event (bool flag=true) const |
If flag is true, all event types are printed for this node. More... | |
| void | adopt_print_flags (const system_node &node) const |
Adopts the print flags of node. More... | |
| virtual scale | time_precision () const =0 |
Returns the time precision associated with the node, or no_scale. More... | |
| duration | process_initialization_event () |
| Processes an initialization event; returns a planned duration. More... | |
| duration | process_unplanned_event (duration elapsed_dt) |
Processes an unplanned event after an elapsed duration elapsed_dt; returns a planned duration. More... | |
| duration | process_planned_event (duration elapsed_dt) |
Processes a planned event after an elapsed duration elapsed_dt; returns a planned duration. More... | |
| void | process_finalization_event (duration elapsed_dt) |
Processes a finalization event after an elapsed duration elapsed_dt. More... | |
Protected Member Functions | |
| collection_node_base (const std::string &node_name, const node_context &external_context) | |
Constructs a collection_node_base. More... | |
| const node_context & | prototype_context () |
| Returns a const reference to the prototype node's context object. More... | |
| node_structure & | prototype_structure () |
| Returns a non-const reference to the prototype node's encompassing structure object. More... | |
Protected Member Functions inherited from sydevs::systems::system_node | |
| system_node (const std::string &node_name, const node_context &external_context) | |
Constructs a system_node. More... | |
| node_interface & | external_IO () const |
| Returns a non-const reference to the node's external interface. More... | |
| timer & | ET () const |
| Returns a non-const reference to the node's event timer. More... | |
| duration | scale_planned_dt (duration planned_dt) const |
| Adjusts the planned duration obtained from other nodes' event handlers. More... | |
Additional Inherited Members | |
Protected Attributes inherited from sydevs::systems::system_node | |
| std::mt19937 & | rng |
| Reference to the random number generator. More... | |
A base class for the collection node class template.
collection_node_base defines and provides access to a context representation specifically intended for the prototype node. The prototype node is defined in the collection_node class template, which derives from this base class. This arrangement ensures that the prototype's context is initialized prior to the prototype node itself.
|
virtualdefault |
Destructor.
|
inlineprotected |
Constructs a collection_node_base.
Constructs the collection node base and its associated node_interface object. Also initializes the prototype context.
| node_name | The name of the node within the encompassing context. |
| external_context | The context in which the node is constructed. |
|
inlinevirtual |
Returns message for all collection nodes.
Implements sydevs::systems::system_node.
|
inlineprotected |
Returns a const reference to the prototype node's context object.
|
inlineprotected |
Returns a non-const reference to the prototype node's encompassing structure object.