mimmo::PortOut Class Referenceabstract

PortOut is the abstract PIN base class dedicated to exchange data from a target class to other ones (output). More...

#include <InOut.hpp>

Inheritance diagram for mimmo::PortOut:
Collaboration diagram for mimmo::PortOut:

Public Member Functions

 PortOut ()
 
 PortOut (const PortOut &other)
 
virtual ~PortOut ()
 
void cleanBuffer ()
 
void clear ()
 
void clear (int j)
 
void exec ()
 
DataType getDataType ()
 
std::vector< BaseManipulation * > getLink ()
 
std::vector< PortIDgetPortLink ()
 
bool operator== (const PortOut &other)
 
virtual void writeBuffer ()=0
 

Public Attributes

DataType m_datatype
 
std::vector< BaseManipulation * > m_objLink
 
mimmo::OBinaryStream m_obuffer
 
std::vector< PortIDm_portLink
 

Detailed Description

PortOut is the abstract PIN base class dedicated to exchange data from a target class to other ones (output).

A PIN is an object member of BaseManipulation object. Through a PIN two base manipulation objects are linked together. One of these two objects is the parent object that gives an output to the other one that takes this value as input.

The class store the following data:

  • a buffer to communicate output data (m_obuffer)
  • a list of pointer to BaseManipulation receivers (m_objLink)
  • a list of Ports identifiers (string basically), marking the input ports of receivers, where the data will be sent (m_portLink)
  • information on the container and data type exchanged (m_datatype)

In general, a set of data (still not specified in this abstract class) of type m_datatype, written in a buffer stream m_obuffer, will be sent to a list of BaseManipulation objects/receivers. Input ports of receivers are responsible to decode the data buffer sent, and make available the data to their respective receveir.

The execution of the output PortT will automatically exchange the buffer data, pass it to the input ports connected and makes them reading and decoding the data.

Definition at line 96 of file InOut.hpp.

Constructor & Destructor Documentation

◆ PortOut() [1/2]

mimmo::PortOut::PortOut ( )

Default constructor of PortOut

Definition at line 75 of file InOut.cpp.

◆ ~PortOut()

mimmo::PortOut::~PortOut ( )
virtual

Default destructor of PortOut

Definition at line 82 of file InOut.cpp.

◆ PortOut() [2/2]

mimmo::PortOut::PortOut ( const PortOut other)

Copy constructor of PortOut.

Definition at line 87 of file InOut.cpp.

Member Function Documentation

◆ cleanBuffer()

void mimmo::PortOut::cleanBuffer ( )

It empties the output buffer.

Definition at line 137 of file InOut.cpp.

◆ clear() [1/2]

void mimmo::PortOut::clear ( )

It clears the links to objects and the related ports.

Definition at line 145 of file InOut.cpp.

◆ clear() [2/2]

void mimmo::PortOut::clear ( int  j)

It removes the link to an object and the related port Marker.

Parameters
[in]jIndex of the linked object in the links vector of this port.

Definition at line 155 of file InOut.cpp.

◆ exec()

void mimmo::PortOut::exec ( )

Execution of the PIN. All the pins are called in execution of the sending owner after its own execution. Reading stage of pin linked receivers is automatically performed within this execution.

Definition at line 168 of file InOut.cpp.

◆ getDataType()

DataType mimmo::PortOut::getDataType ( )

It gets the TAG of container/data types communicated by this port.

Returns
TAG of container/data types communicated.

Definition at line 129 of file InOut.cpp.

◆ getLink()

std::vector< mimmo::BaseManipulation * > mimmo::PortOut::getLink ( )

It gets the objects linked by this port.

Returns
vector of pointer to linked objects.

Definition at line 111 of file InOut.cpp.

◆ getPortLink()

std::vector< PortID > mimmo::PortOut::getPortLink ( )

It gets the input port Markers of the objects linked by this port.

Returns
Vector of PortID.

Definition at line 120 of file InOut.cpp.

◆ operator==()

bool mimmo::PortOut::operator== ( const PortOut other)

Compare operator of PortOut.

Definition at line 98 of file InOut.cpp.

◆ writeBuffer()

virtual void mimmo::PortOut::writeBuffer ( )
pure virtual

Pure virtual function to write a buffer.

Implemented in mimmo::PortOutT< T, O >.

Member Data Documentation

◆ m_datatype

DataType mimmo::PortOut::m_datatype

TAG of type of data communicated.

Definition at line 102 of file InOut.hpp.

◆ m_objLink

std::vector<BaseManipulation*> mimmo::PortOut::m_objLink

Outputs object to which communicate the data.

Definition at line 100 of file InOut.hpp.

◆ m_obuffer

mimmo::OBinaryStream mimmo::PortOut::m_obuffer

Output buffer to communicate data.

Definition at line 99 of file InOut.hpp.

◆ m_portLink

std::vector<PortID> mimmo::PortOut::m_portLink

ID of the input ports of the linked objects.

Definition at line 101 of file InOut.hpp.


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