TLayer.hh
Go to the documentation of this file.
#pragma once
#include "Layer.hh"
template <typename TPort> class TLayer : public Layer {
typedef std::vector<TPort*> TPortList;
typedef typename std::vector<TPort*>::iterator TPortListIterator;
TPortList upperPorts;
public:
explicit TLayer() : Layer(), upperPorts() { };
explicit TLayer(const std::string& p_type) : Layer(p_type), upperPorts() { };
void addUpperPort(TPort * p_port) { upperPorts.push_back(p_port); };
void removeUpperPort(TPort*);
protected:
template <typename TMessage>
inline void toAllUpperPorts(const TMessage& m, const Params& param) {
for(TPortListIterator it=upperPorts.begin(); it<upperPorts.end(); ++it){
(*it)->receiveMsg(m, param);
}
}
}; // End of class TLayer
Layer
Forward declaration of TITAN class.
Definition: Layer.hh:29
TLayer
Definition: TLayer.hh:15
TLayer::addUpperPort
void addUpperPort(TPort *p_port)
Definition: TLayer.hh:24
TLayer::toAllUpperPorts
void toAllUpperPorts(const TMessage &m, const Params &param)
Definition: TLayer.hh:29
TLayer::TPortList
std::vector< TPort * > TPortList
Definition: TLayer.hh:16
Params
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
TLayer::TPortListIterator
std::vector< TPort * >::iterator TPortListIterator
Definition: TLayer.hh:17
TLayer::TLayer
TLayer()
Definition: TLayer.hh:22
TLayer::TLayer
TLayer(const std::string &p_type)
Definition: TLayer.hh:23
TLayer::removeUpperPort
void removeUpperPort(TPort *)
Layer.hh
TLayer::upperPorts
TPortList upperPorts
Definition: TLayer.hh:19