libcamgm
LiteralValues.hpp
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | _ _ _ _ __ _ |
4 | | | | | | \_/ | / \ | | |
5 | | | | | | |_| | / /\ \ | | |
6 | | |__ | | | | | | / ____ \ | |__ |
7 | |____||_| |_| |_|/ / \ \|____| |
8 | |
9 | ca-mgm library |
10 | |
11 | (C) SUSE Linux Products GmbH |
12 \----------------------------------------------------------------------/
13 
14  File: LiteralValues.hpp
15 
16  Author: <Michael Calmer> <mc@suse.de>
17  Maintainer: <Michael Calmer> <mc@suse.de>
18 
19  Purpose:
20 
21 /-*/
22 #ifndef CA_MGM_LITERAL_VALUES_HPP
23 #define CA_MGM_LITERAL_VALUES_HPP
24 
25 #include <ca-mgm/config.h>
26 #include <ca-mgm/CommonData.hpp>
27 #include <ca-mgm/PtrTypes.hpp>
28 
29 
30 namespace CA_MGM_NAMESPACE {
31 
32  class LiteralValueImpl;
33  class CA;
34 
41  class LiteralValue {
42  public:
43  LiteralValue();
44 
51  LiteralValue(const std::string &type, const std::string &value);
52 
59  LiteralValue(const std::string& value);
60  LiteralValue(const LiteralValue& value);
61 
62 #ifndef SWIG
63 
65  operator=(const LiteralValue& value);
66 
67 #endif
68 
69  virtual ~LiteralValue();
70 
77  void
78  setLiteral(const std::string &type, const std::string &value);
79 
86  void
87  setValue(const std::string &value);
88 
92  std::string
93  getType() const;
94 
98  std::string
99  getValue() const;
100 
101  virtual bool
102  valid() const;
103 
104  virtual std::vector<std::string>
105  verify() const;
106 
107  virtual std::vector<std::string>
108  dump() const;
109 
113  std::string
114  toString() const;
115 
120  std::string
121  commit2Config(CA& ca, Type type, uint32_t num) const;
122 
123 #ifndef SWIG
124 
125  friend bool
126  operator==(const LiteralValue &l, const LiteralValue &r);
127 
128  friend bool
129  operator<(const LiteralValue &l, const LiteralValue &r);
130 
131 #endif
132 
133  private:
135 
136  };
137 }
138 
139 #endif // CA_MGM_LITERAL_VALUES_HPP
std::string toString(bool b)
Definition: String.hpp:125
Managing a CA repository.
Definition: CA.hpp:54
Type
Definition: CommonData.hpp:39
ca_mgm::RWCOW_pointer< LiteralValueImpl > m_impl
Definition: LiteralValues.hpp:134
Definition: LiteralValues.hpp:41
bool operator==(const PathName &lname, const PathName &rname)
Definition: PathName.hpp:435