ANNA Suite
2020b
Multipurpose development suite for Telco applications
include
anna
comm
ReceiverFactoryImpl.hpp
Go to the documentation of this file.
1
// ANNA - Anna is Not Nothingness Anymore //
2
// //
3
// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4
// //
5
// See project site at http://redmine.teslayout.com/projects/anna-suite //
6
// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9
#ifndef anna_comm_ReceiverFactoryImpl_hpp
10
#define anna_comm_ReceiverFactoryImpl_hpp
11
12
#include <
anna/core/util/Recycler.hpp
>
13
14
#include <
anna/comm/ReceiverFactory.hpp
>
15
16
namespace
anna
{
17
18
namespace
comm {
19
20
class
Factory;
21
32
template
<
typename
T>
class
ReceiverFactoryImpl :
public
ReceiverFactory {
33
public
:
37
ReceiverFactoryImpl() : ReceiverFactory(T::className()) {;}
38
39
private
:
40
Recycler<T> a_receivers;
41
42
Receiver* do_create() {
return
a_receivers.create(); }
43
void
do_release(Receiver* receiver) { a_receivers.release(static_cast <T*>(receiver)); }
44
};
45
46
}
47
}
48
49
#endif
50
ReceiverFactory.hpp
Recycler.hpp
anna
Definition:
app.hpp:12
Generated on Mon Oct 30 2023 12:15:32 for ANNA Suite by
1.8.13