ANNA Suite  2020b
Multipurpose development suite for Telco applications
IndexedDelivery.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_IndexedDelivery_hpp
10 #define anna_comm_IndexedDelivery_hpp
11 
12 #include <anna/comm/Service.hpp>
13 
14 namespace anna {
15 
16 namespace comm {
17 class Resource;
18 }
19 
20 namespace comm {
21 
28 public:
32  struct Mode {
33  enum _v {
35  Flexible
36  };
37  };
38 
46  IndexedDelivery(const char* name, const bool isCritical, const Mode::_v mode) :
47  comm::Service(name, isCritical),
48  a_mode(mode),
49  a_iikey(0)
50  {;}
51 
57  void prepare(const int key) noexcept(false);
58 
59  std::string asString() const ;
60 
61  xml::Node* asXML(xml::Node* parent) const ;
62 
69  static const char* className() { return "anna::comm::IndexedDelivery"; }
70 
71 private:
72  //------------------------------------------------------------------------------------
73  // - a_iiserver: iterador que apunta al servidor que debemos usar.
74  //------------------------------------------------------------------------------------
75  const Mode::_v a_mode;
76  iterator a_iikey;
77 
78  virtual void do_initialize() noexcept(false) {;}
79  comm::Resource* do_apply() noexcept(false);
80 };
81 
82 }
83 }
84 
85 #endif
86 
Definition: Node.hpp:56
static const char * className()
Definition: IndexedDelivery.hpp:69
Definition: IndexedDelivery.hpp:34
Definition: Resource.hpp:25
Definition: app.hpp:12
IndexedDelivery(const char *name, const bool isCritical, const Mode::_v mode)
Definition: IndexedDelivery.hpp:46
Definition: IndexedDelivery.hpp:32
Resources::iterator iterator
Definition: Delivery.hpp:34
_v
Definition: IndexedDelivery.hpp:33
Definition: Service.hpp:28
Definition: IndexedDelivery.hpp:27