mimmo::PortIn Class Referenceabstract

PortIn is the abstract PIN base class dedicated to carry data to a target class from other ones (input). More...

#include <InOut.hpp>

Inheritance diagram for mimmo::PortIn:
Collaboration diagram for mimmo::PortIn:

Public Member Functions

 PortIn ()
 
 PortIn (const PortIn &other)
 
virtual ~PortIn ()
 
void cleanBuffer ()
 
void clear ()
 
void clear (int j)
 
DataType getDataType ()
 
int getFamily ()
 
std::vector< mimmo::BaseManipulation * > getLink ()
 
bool isMandatory ()
 
bool operator== (const PortIn &other)
 
virtual void readBuffer ()=0
 

Public Attributes

DataType m_datatype
 
int m_familym
 
mimmo::IBinaryStream m_ibuffer
 
bool m_mandatory
 
std::vector< BaseManipulation * > m_objLink
 

Detailed Description

PortIn is the abstract PIN base class dedicated to carry data to a target class from other ones (input).

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 input data (m_ibuffer)
  • a list of pointer to BaseManipulation senders (m_objLink)
  • information on the container and data type exchanged (m_datatype)

In general, a set of data of type m_datatype, is sent from one or more senders and read as a buffer stream m_ibuffer. This class is responsible to decode the data and handle with the problem to manage multiple data coming from multiple senders and makes it available (how to read the data, handle with its multiplicity and makes it available its still not specified in this abstract class).

Definition at line 201 of file InOut.hpp.

Constructor & Destructor Documentation

◆ PortIn() [1/2]

mimmo::PortIn::PortIn ( )

Default constructor of PortIn

Definition at line 186 of file InOut.cpp.

◆ ~PortIn()

mimmo::PortIn::~PortIn ( )
virtual

Default destructor of PortIn

Definition at line 194 of file InOut.cpp.

◆ PortIn() [2/2]

mimmo::PortIn::PortIn ( const PortIn other)

Copy constructor of PortIn.

Definition at line 199 of file InOut.cpp.

Member Function Documentation

◆ cleanBuffer()

void mimmo::PortIn::cleanBuffer ( )

It releases the memory occupied by the input buffer.

Definition at line 280 of file InOut.cpp.

◆ clear() [1/2]

void mimmo::PortIn::clear ( )

It clears all linked objects into this port.

Definition at line 260 of file InOut.cpp.

◆ clear() [2/2]

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

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

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

Definition at line 269 of file InOut.cpp.

◆ getDataType()

DataType mimmo::PortIn::getDataType ( )

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

Returns
TAG of container/data type communicated.

Definition at line 234 of file InOut.cpp.

◆ getFamily()

int mimmo::PortIn::getFamily ( )

It gets the family of this port.

Returns
mandatory family.

Definition at line 252 of file InOut.cpp.

◆ getLink()

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

It gets the linked object by this port.

Returns
Pointer to linked object.

Definition at line 225 of file InOut.cpp.

◆ isMandatory()

bool mimmo::PortIn::isMandatory ( )

It gets if this port has to be mandatorily linked.

Returns
mandatory?.

Definition at line 243 of file InOut.cpp.

◆ operator==()

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

Compare operator of PortIn.

Definition at line 211 of file InOut.cpp.

◆ readBuffer()

virtual void mimmo::PortIn::readBuffer ( )
pure virtual

Pure virtual function to read a buffer.

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

Member Data Documentation

◆ m_datatype

DataType mimmo::PortIn::m_datatype

TAG of type of data communicated.

Definition at line 206 of file InOut.hpp.

◆ m_familym

int mimmo::PortIn::m_familym

Tag of family of mandatory alternative ports. At least one of the ports of the same family has to be linked. Family TAG = 0 -> no family, this port has to be mandatory linked.

Definition at line 208 of file InOut.hpp.

◆ m_ibuffer

mimmo::IBinaryStream mimmo::PortIn::m_ibuffer

input buffer to recover data.

Definition at line 204 of file InOut.hpp.

◆ m_mandatory

bool mimmo::PortIn::m_mandatory

Does the port have to be mandatorily linked?.

Definition at line 207 of file InOut.hpp.

◆ m_objLink

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

Input objects from which recover the data.

Definition at line 205 of file InOut.hpp.


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