Dripline-Cpp  v2.4.2
Dripline Implementation in C++
specifier.hh
Go to the documentation of this file.
1 /*
2  * specifier.hh
3  *
4  * Created on: Feb 18, 2016
5  * Author: nsoblath
6  */
7 
8 #ifndef DRIPLINE_SPECIFIER_HH_
9 #define DRIPLINE_SPECIFIER_HH_
10 
11 #include "dripline_api.hh"
12 
13 #include "member_variables.hh"
14 
15 #include <deque>
16 #include <string>
17 
18 namespace dripline
19 {
20 
27  class DRIPLINE_API routing_key : public std::deque< std::string >
28  {
29  public:
30  typedef std::deque< std::string > container_type;
31 
32  public:
33  routing_key( const std::string& a_rk = "" );
34  virtual ~routing_key();
35 
37  void parse( const std::string& a_rk );
39  std::string to_string() const;
40 
41  private:
42  void add_next( const std::string& a_addr );
43 
44  public:
45  static const char f_node_separator = '.';
46 
47  };
48 
55  class DRIPLINE_API specifier : public std::deque< std::string >
56  {
57  public:
58  typedef std::deque< std::string > container_type;
59 
60  public:
61  specifier( const std::string& a_unparsed = "" );
62  specifier( const specifier& a_orig );
63  specifier( specifier&& a_orig );
64  virtual ~specifier();
65 
66  const specifier& operator=( const specifier& a_orig );
67  const specifier& operator=( specifier&& a_orig );
68 
70  void parse( const std::string& a_unparsed );
72  void reparse();
74  std::string to_string() const;
75 
77  mv_referrable( std::string, unparsed );
78 
79  private:
80  void add_next( const std::string& a_addr );
81 
82  public:
83  static const char f_node_separator = '.';
84 
85  };
86 
87  inline void specifier::reparse()
88  {
89  parse( f_unparsed );
90  return;
91  }
92 
93 
94 } /* namespace dripline */
95 
96 #endif /* DRIPLINE_SPECIFIER_HH_ */
Parses routing keys and stores the tokenized information.
Definition: specifier.hh:27
void reparse()
Parses the contents of f_unparsed.
Definition: specifier.hh:87
#define DRIPLINE_API
Definition: dripline_api.hh:34
std::deque< std::string > container_type
Definition: specifier.hh:30
std::deque< std::string > container_type
Definition: specifier.hh:58
std::string to_string(op_t an_op)
Gives the human-readable version of a message operation.
Parses specifiers and stores the tokenized information.
Definition: specifier.hh:55