00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef LIMAL_CA_MGM_LITERAL_VALUES_HPP
00023 #define LIMAL_CA_MGM_LITERAL_VALUES_HPP
00024
00025 #include <limal/ca-mgm/config.h>
00026 #include <limal/ca-mgm/CommonData.hpp>
00027 #include <blocxx/COWIntrusiveReference.hpp>
00028
00029 namespace LIMAL_NAMESPACE {
00030
00031 namespace CA_MGM_NAMESPACE {
00032
00033 class LiteralValueImpl;
00034 class CA;
00035
00042 class LiteralValue {
00043 public:
00044 LiteralValue();
00045
00052 LiteralValue(const String &type, const String &value);
00053
00060 LiteralValue(const String& value);
00061 LiteralValue(const LiteralValue& value);
00062
00063 #ifndef SWIG
00064
00065 LiteralValue&
00066 operator=(const LiteralValue& value);
00067
00068 #endif
00069
00070 virtual ~LiteralValue();
00071
00078 void
00079 setLiteral(const String &type, const String &value);
00080
00087 void
00088 setValue(const String &value);
00089
00093 String
00094 getType() const;
00095
00099 String
00100 getValue() const;
00101
00102 virtual bool
00103 valid() const;
00104
00105 virtual blocxx::StringArray
00106 verify() const;
00107
00108 virtual blocxx::StringArray
00109 dump() const;
00110
00114 String
00115 toString() const;
00116
00121 blocxx::String
00122 commit2Config(CA& ca, Type type, blocxx::UInt32 num) const;
00123
00124 #ifndef SWIG
00125
00126 friend bool
00127 operator==(const LiteralValue &l, const LiteralValue &r);
00128
00129 friend bool
00130 operator<(const LiteralValue &l, const LiteralValue &r);
00131
00132 #endif
00133
00134 private:
00135 blocxx::COWIntrusiveReference<LiteralValueImpl> m_impl;
00136
00137 };
00138
00139 }
00140 }
00141
00142 #endif // LIMAL_CA_MGM_LITERAL_VALUES_HPP