Remove dynamic exceptions
[anna.git] / include / anna / comm / handler / Allocator.hpp
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_handler_Allocator_hpp
10 #define anna_comm_handler_Allocator_hpp
11
12 namespace anna {
13
14 namespace comm {
15
16 class Communicator;
17
18 namespace handler {
19
20 template <typename _Handler> class Allocator {
21 public:
22   static Communicator* st_communicator;
23
24   static _Handler* create()
25   {
26     return new _Handler(st_communicator);
27   }
28   static void destroy(_Handler* t) { delete t; }
29 };
30
31 }
32 }
33 }
34
35 #endif
36