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

pcap_layer_factory.hh
Go to the documentation of this file.
1
11 #pragma once
12
13 #if (OSTYPE == linux)
14
15 #include "layer_stack_builder.hh"
16
17 #include "pcap_layer.hh"
18
23 class pcap_layer_factory: public layer_factory {
24 static pcap_layer_factory _f;
25 public:
26
31 pcap_layer_factory() {
32 // register factory
33 layer_stack_builder::register_layer_factory("PCAP", this);
34 };
43 inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) {
44 return new pcap_layer(p_type, p_param);
45 };
46 }; // End of class pcap_layer_factory
47
48 #endif
49
pcap_layer
Forward declaration of TITAN class.
Definition: pcap_layer.hh:28
pcap_layer_factory
This class provides a factory class to create an pcap_layer class instance.
Definition: pcap_layer_factory.hh:23
layer
Forward declaration of TITAN class.
Definition: layer.hh:29
layer_factory
This class provides a factory class to create layer class instances .
Definition: layer_factory.hh:25
pcap_layer.hh
Header file for ITS Pcap port layer.
layer_stack_builder.hh
Header file for ITS protocol stack builder.
pcap_layer_factory::pcap_layer_factory
pcap_layer_factory()
Reference to the unique instance of this class.
Definition: pcap_layer_factory.hh:31
pcap_layer_factory::create_layer
virtual layer * create_layer(const std::string &p_type, const std::string &p_param)
Create the layers stack based on the provided layers stack description.
Definition: pcap_layer_factory.hh:43
pcap_layer_factory::_f
static pcap_layer_factory _f
Definition: pcap_layer_factory.hh:24
layer_stack_builder::register_layer_factory
static void register_layer_factory(const std::string &p_type, layer_factory *p_layer_factory)
Add a new layer factory.
Definition: layer_factory.cc:16