SyDEVS  v0.6.7
Multiscale Simulation and Systems Modeling Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sydevs::systems::port< flow, input, T > Class Template Reference

A class template for flow input ports. More...

#include <port.h>

Inherits sydevs::systems::port_base< flow, input, T >.

Public Member Functions

 port (const std::string &port_name, const node_interface &external_interface)
 Constructs a port<flow, input> object. More...
 
 port (port &&)=default
 Move constructor. More...
 
portoperator= (port &&)=default
 Move assignment. More...
 
 ~port ()=default
 Destructor. More...
 
const T & value () const
 Returns the current value attached 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, input, T >
 port_base (const port_base &)=delete
 No copy constructor. More...
 
 port_base (port_base &&)=default
 Move constructor. More...
 
port_baseoperator= (const port_base &)=delete
 No copy assignment. More...
 
port_baseoperator= (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_interfaceexternal_interface () const
 Returns the encomassing node_interface object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sydevs::systems::port_base< flow, input, T >
 port_base (const std::string &port_name, int64 port_index, node_interface &external_interface)
 

Detailed Description

template<typename T>
class sydevs::systems::port< flow, input, T >

A class template for flow input ports.

A port<flow, input> object is used to supply a system_node object with a parameter at the beginning of a simulation.

Template Parameters
TThe type of data handled by the port.

Constructor & Destructor Documentation

template<typename T >
sydevs::systems::port< flow, input, T >::port ( const std::string &  port_name,
const node_interface external_interface 
)

Constructs a port<flow, input> object.

The port is created and registered with the encompassing node_interface object.

Parameters
port_nameThe name of the port.
external_interfaceThe encompassing node_interface object associated with the node.
Template Parameters
TThe type of data handled by the port.
template<typename T >
sydevs::systems::port< flow, input, T >::port ( port< flow, input, T > &&  )
default

Move constructor.

template<typename T >
sydevs::systems::port< flow, input, T >::~port ( )
default

Destructor.

Member Function Documentation

template<typename T >
port& sydevs::systems::port< flow, input, T >::operator= ( port< flow, input, T > &&  )
default

Move assignment.

template<typename T >
void sydevs::systems::port< flow, input, T >::print_on_use ( bool  flag = true) const

If flag is true, all values communicated through this port are printed.

template<typename T >
const T & sydevs::systems::port< flow, input, T >::value ( ) const

Returns the current value attached to the port.


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