DDS  ver. 2.0
TopoProperty.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__TopoProperty__
7 #define __DDS__TopoProperty__
8 
9 // DDS
10 #include "TopoBase.h"
11 // STD
12 #include <sstream>
13 #include <string>
14 #include <vector>
15 // BOOST
16 #include <boost/property_tree/ptree.hpp>
17 
18 namespace dds
19 {
20  namespace topology_api
21  {
23  {
24  READ,
25  WRITE,
26  READWRITE
27  };
28 
31  class CTopoProperty : public CTopoBase
32  {
33  public:
35  CTopoProperty();
36 
38  virtual ~CTopoProperty();
39 
41  void initFromPropertyTree(const std::string& _name, const boost::property_tree::ptree& _pt);
42 
43  const std::string& getValue() const;
44  EPropertyAccessType getAccessType() const;
45 
46  void setValue(const std::string& _value);
47  void setAccessType(EPropertyAccessType _accessType);
48 
51  virtual std::string toString() const;
52 
56  friend std::ostream& operator<<(std::ostream& _strm, const CTopoProperty& _property);
57 
58  private:
59  std::string m_value;
60  EPropertyAccessType m_accessType;
61  };
62 
63  typedef std::shared_ptr<CTopoProperty> TopoPropertyPtr_t;
64  typedef std::vector<TopoPropertyPtr_t> TopoPropertyPtrVector_t;
65  }
66 }
67 #endif /* defined(__DDS__TopoProperty__) */
Definition: TopoBase.h:35
std::vector< TopoPropertyPtr_t > TopoPropertyPtrVector_t
Definition: TopoProperty.h:64
EPropertyAccessType
Definition: TopoProperty.h:22
Definition: dds-agent/src/AgentConnectionManager.h:18
Definition: TopoProperty.h:31
std::shared_ptr< CTopoProperty > TopoPropertyPtr_t
Definition: TopoProperty.h:63
std::ostream & operator<<(std::ostream &_out, EAgentCmdType &_agentCmd)
Definition: dds-agent-cmd/src/Options.h:45