Newer
Older
/*!
* \file diameter_layer_factory.hh
Yann Garcia
committed
* \brief Header file for Diameter protocol layer factory.
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
* \author ETSI TTF T010
* \copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* \version 0.1
*/
#pragma once
#include "layer_stack_builder.hh"
#include "diameter_layer.hh"
/*!
* \class diameter_layer_factory
* \brief This class provides a factory class to create an diameter_layer class instance
*/
class diameter_layer_factory : public layer_factory {
static diameter_layer_factory _f; //! Reference to the unique instance of this class
public: //! \publicsection
/*!
* \brief Default constructor
* Create a new instance of the udp_layer_factory class
* \remark The HTTP layer identifier is HTTP
*/
diameter_layer_factory() {
// Register factory
layer_stack_builder::register_layer_factory("DIAMETER", this);
};
/*!
* \fn layer* create_layer(const std::string & type, const std::string & param);
* \brief Create the layers stack based on the provided layers stack description
* \param[in] p_type The provided layers stack description
* \param[in] p_params Optional parameters
* \return 0 on success, -1 otherwise
* \inline
*/
inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param){
return new diameter_layer(p_type, p_param);
};
}; // End of class diameter_layer_factory