ETSI STF525 / Internal Testing test suite This project provides an internal testing test suite and its associated Test Adapter/Codec

TLayer.hh
Go to the documentation of this file.
1
11 #pragma once
12
13 #include "Layer.hh"
14
15 template <typename TPort> class TLayer : public Layer {
16 typedef std::vector<TPort*> TPortList;
17 typedef typename std::vector<TPort*>::iterator TPortListIterator;
18
19 TPortList upperPorts;
20
21 public:
22 explicit TLayer() : Layer(), upperPorts() { };
23 explicit TLayer(const std::string& p_type) : Layer(p_type), upperPorts() { };
24 void addUpperPort(TPort * p_port) { upperPorts.push_back(p_port); };
25 void removeUpperPort(TPort*);
26
27 protected:
28 template <typename TMessage>
29 inline void toAllUpperPorts(const TMessage& m, const Params& param) {
30 for(TPortListIterator it=upperPorts.begin(); it<upperPorts.end(); ++it){
31 (*it)->receiveMsg(m, param);
32 }
33 }
34 }; // End of class TLayer
35
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