ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | Public Attributes | List of all members
anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range Struct Reference

#include <ByRangeDelivery.hpp>

Public Member Functions

 Range (const std::string &baseName, const TKey &_bottom, const TKey &_top)
 
std::string asString () const
 
xml::NodeasXML (xml::Node *parent) const
 

Public Attributes

const TKey bottom
 
const TKey top
 
TDelivery * delivery
 

Constructor & Destructor Documentation

◆ Range()

template<typename TKey , typename TDelivery = RoundRobinDelivery, typename TSerializer = anna::functions>
anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range::Range ( const std::string &  baseName,
const TKey &  _bottom,
const TKey &  _top 
)
inline
49  :
50  bottom(_bottom), top(_top) {
51  std::string name(baseName);
52  name += '[';
53  name += TSerializer::asString(_bottom);
54  name += ',';
55  name += TSerializer::asString(_top);
56  name += ']';
57  delivery = new TDelivery(name.c_str(), false);
58  }
TDelivery * delivery
Definition: ByRangeDelivery.hpp:47
const TKey top
Definition: ByRangeDelivery.hpp:46
const TKey bottom
Definition: ByRangeDelivery.hpp:45

Member Function Documentation

◆ asString()

template<typename TKey , typename TDelivery = RoundRobinDelivery, typename TSerializer = anna::functions>
std::string anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range::asString ( void  ) const
inline
60  {
61  std::string result("comm::ByRangeDelivery { Bottom: ");
62  result += TSerializer::asString(bottom);
63  result += " | Top: ";
64  result += TSerializer::asString(top);
65  result += " | ";
66  result += delivery->asString();
67  return result += " }";
68  }
TDelivery * delivery
Definition: ByRangeDelivery.hpp:47
const TKey top
Definition: ByRangeDelivery.hpp:46
const TKey bottom
Definition: ByRangeDelivery.hpp:45

◆ asXML()

template<typename TKey , typename TDelivery = RoundRobinDelivery, typename TSerializer = anna::functions>
xml::Node* anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range::asXML ( xml::Node parent) const
inline
70  {
71  xml::Node* result = parent->createChild("comm.Range");
72  result->createAttribute("Bottom", TSerializer::asString(bottom));
73  result->createAttribute("Top", TSerializer::asString(top));
74  delivery->asXML(result);
75  return result;
76  }
TDelivery * delivery
Definition: ByRangeDelivery.hpp:47
xml::Attribute * createAttribute(const char *name, const char *value, const Namespace *_namespace=NULL)
Node * createChild(const char *name)
const TKey top
Definition: ByRangeDelivery.hpp:46
xml::Node Node
Definition: Node.hpp:21
const TKey bottom
Definition: ByRangeDelivery.hpp:45
Here is the call graph for this function:

Member Data Documentation

◆ bottom

template<typename TKey , typename TDelivery = RoundRobinDelivery, typename TSerializer = anna::functions>
const TKey anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range::bottom

◆ delivery

template<typename TKey , typename TDelivery = RoundRobinDelivery, typename TSerializer = anna::functions>
TDelivery* anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range::delivery

◆ top

template<typename TKey , typename TDelivery = RoundRobinDelivery, typename TSerializer = anna::functions>
const TKey anna::comm::ByRangeDelivery< TKey, TDelivery, TSerializer >::Range::top

The documentation for this struct was generated from the following file: