DDS  ver. 3.5.3.8.g5fe284b
TopoTrigger.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__TopoTrigger__
7 #define __DDS__TopoTrigger__
8 
9 // DDS
10 #include "TopoBase.h"
11 // STD
12 #include <string>
13 
14 namespace dds
15 {
16  namespace topology_api
17  {
20  class CTopoTrigger : public CTopoBase
21  {
22  public:
23  enum class EConditionType
24  {
25  None,
27  };
28 
29  enum class EActionType
30  {
31  None,
33  };
34 
35  using Ptr_t = std::shared_ptr<CTopoTrigger>;
36  using PtrVector_t = std::vector<CTopoTrigger::Ptr_t>;
37 
39  CTopoTrigger(const std::string& _name);
40 
42  virtual ~CTopoTrigger();
43 
45  void initFromPropertyTree(const boost::property_tree::ptree& _pt);
46 
48  void saveToPropertyTree(boost::property_tree::ptree& _pt);
49 
51  EActionType getAction() const;
52  const std::string& getArgument() const;
53 
54  void setAction(EActionType _action);
55  void setCondition(EConditionType _condition);
56  void setArgument(const std::string& _argument);
57 
60  virtual std::string toString() const;
61 
65  friend std::ostream& operator<<(std::ostream& _strm, const CTopoTrigger& _trigger);
66 
68  virtual std::string hashString() const;
69 
70  private:
71  EActionType m_action{ EActionType::None };
72  EConditionType m_condition{ EConditionType::None };
73  std::string m_argument;
74  };
75  } // namespace topology_api
76 } // namespace dds
77 
78 #endif /* defined(__DDS__TopoTrigger__) */
void initFromPropertyTree(const boost::property_tree::ptree &_pt)
Inherited from TopoBase.
Definition: TopoTrigger.cpp:58
Definition: TopoBase.h:20
virtual std::string toString() const
Returns string representation of an object.
Definition: TopoTrigger.cpp:90
Definition: TopoTrigger.h:20
EActionType getAction() const
Definition: TopoTrigger.cpp:33
std::shared_ptr< CTopoBase > Ptr_t
Definition: TopoBase.h:36
void saveToPropertyTree(boost::property_tree::ptree &_pt)
Inherited from TopoBase.
Definition: TopoTrigger.cpp:74
EActionType
Definition: TopoTrigger.h:29
void setAction(EActionType _action)
Definition: TopoTrigger.cpp:43
EConditionType
Definition: TopoTrigger.h:23
virtual std::string hashString() const
Inherited from TopoBase.
Definition: TopoTrigger.cpp:104
CTopoTrigger(const std::string &_name)
Constructor.
Definition: TopoTrigger.cpp:18
Definition: AgentConnectionManager.h:13
std::vector< CTopoBase::Ptr_t > PtrVector_t
Definition: TopoBase.h:37
EConditionType getCondition() const
Definition: TopoTrigger.cpp:28
void setArgument(const std::string &_argument)
Definition: TopoTrigger.cpp:53
virtual ~CTopoTrigger()
Destructor.
Definition: TopoTrigger.cpp:24
const std::string & getArgument() const
Definition: TopoTrigger.cpp:38
void setCondition(EConditionType _condition)
Definition: TopoTrigger.cpp:48
friend std::ostream & operator<<(std::ostream &_strm, const CTopoTrigger &_trigger)
Operator << for convenient output to ostream.