SyDEVS
v0.6.7
Multiscale Simulation and Systems Modeling Library
|
A class template for flow output ports. More...
#include <port.h>
Inherits sydevs::systems::port_base< flow, output, T >.
Public Member Functions | |
port (const std::string &port_name, const node_interface &external_interface) | |
Constructs a port<flow, output> object. More... | |
port (port &&)=default | |
Move constructor. More... | |
port & | operator= (port &&)=default |
Move assignment. More... | |
~port ()=default | |
Destructor. More... | |
void | assign (const T &val) |
Attaches the value val to the port. More... | |
void | print_on_use (bool flag=true) const |
If flag is true , all values communicated through this port are printed. More... | |
Public Member Functions inherited from sydevs::systems::port_base< flow, output, T > | |
port_base (const port_base &)=delete | |
No copy constructor. More... | |
port_base (port_base &&)=default | |
Move constructor. More... | |
port_base & | operator= (const port_base &)=delete |
No copy assignment. More... | |
port_base & | operator= (port_base &&)=default |
Move assignment. More... | |
virtual | ~port_base ()=default |
Destructor. More... | |
const std::string & | port_name () const |
Returns the name of the port. More... | |
int64 | port_index () const |
Returns the index of the port within the encompassing node_interface object. More... | |
int64 | node_index () const |
Returns the index of the node within the encompassing node_structure object. More... | |
const node_interface & | external_interface () const |
Returns the encomassing node_interface object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from sydevs::systems::port_base< flow, output, T > | |
port_base (const std::string &port_name, int64 port_index, node_interface &external_interface) | |
A class template for flow output ports.
A port<flow, output>
object is used to communicate a statistic from a system_node
object at the end of a simulation.
T | The type of data handled by the port. |
sydevs::systems::port< flow, output, T >::port | ( | const std::string & | port_name, |
const node_interface & | external_interface | ||
) |
Constructs a port<flow, output>
object.
The port is created and registered with the encompassing node_interface
object.
port_name | The name of the port. |
external_interface | The encompassing node_interface object associated with the node. |
T | The type of data handled by the port. |
|
default |
Move constructor.
|
default |
Destructor.
void sydevs::systems::port< flow, output, T >::assign | ( | const T & | val | ) |
Attaches the value val
to the port.
|
default |
Move assignment.
void sydevs::systems::port< flow, output, T >::print_on_use | ( | bool | flag = true | ) | const |
If flag
is true
, all values communicated through this port are printed.