DDS  ver. 3.6
TopoVars.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__TopoVars__
7 #define __DDS__TopoVars__
8 
9 // DDS
10 #include "TopoBase.h"
11 // STD
12 #include <map>
13 #include <string>
14 
15 namespace dds
16 {
17  namespace topology_api
18  {
19  class CTopoVars : public CTopoBase
20  {
21  public:
22  using Ptr_t = std::shared_ptr<CTopoVars>;
23  using varMap_t = std::map<std::string, std::string>;
24 
26  CTopoVars(const std::string& _name);
27 
29  virtual ~CTopoVars();
30 
32  void initFromPropertyTree(const boost::property_tree::ptree& _pt);
33 
35  void saveToPropertyTree(boost::property_tree::ptree& _pt);
36 
39  virtual std::string toString() const;
40 
44  friend std::ostream& operator<<(std::ostream& _strm, const CTopoVars& _vars);
45 
47  virtual std::string hashString() const;
48 
49  const varMap_t& getMap() const;
50 
51  private:
52  varMap_t m_map;
53  };
54  } // namespace topology_api
55 } // namespace dds
56 
57 #endif /* defined(__DDS__TopoVars__) */
const varMap_t & getMap() const
Definition: TopoVars.cpp:28
Definition: TopoBase.h:20
CTopoVars(const std::string &_name)
Constructor.
Definition: TopoVars.cpp:18
virtual std::string hashString() const
Inherited from TopoBase.
Definition: TopoVars.cpp:100
virtual ~CTopoVars()
Destructor.
Definition: TopoVars.cpp:24
std::map< std::string, std::string > varMap_t
Definition: TopoVars.h:23
std::shared_ptr< CTopoBase > Ptr_t
Definition: TopoBase.h:36
virtual std::string toString() const
Returns string representation of an object.
Definition: TopoVars.cpp:82
friend std::ostream & operator<<(std::ostream &_strm, const CTopoVars &_vars)
Operator << for convenient output to ostream.
void saveToPropertyTree(boost::property_tree::ptree &_pt)
Inherited from TopoBase.
Definition: TopoVars.cpp:54
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
void initFromPropertyTree(const boost::property_tree::ptree &_pt)
Inherited from TopoBase.
Definition: TopoVars.cpp:33
Definition: TopoVars.h:19