28 #ifndef _util_keyval_keyvalval_h
29 #define _util_keyval_keyvalval_h
36 #include <util/class/class.h>
42 enum KeyValValueError { OK, WrongType };
48 virtual KeyValValue::KeyValValueError doublevalue(
double&)
const;
49 virtual KeyValValue::KeyValValueError booleanvalue(
int&)
const;
50 virtual KeyValValue::KeyValValueError floatvalue(
float&)
const;
51 virtual KeyValValue::KeyValValueError charvalue(
char&)
const;
52 virtual KeyValValue::KeyValValueError intvalue(
int&)
const;
53 virtual KeyValValue::KeyValValueError sizevalue(
size_t&)
const;
54 virtual KeyValValue::KeyValValueError pcharvalue(
const char*&)
const;
55 virtual KeyValValue::KeyValValueError stringvalue(std::string&)
const;
57 virtual void print(std::ostream &o=
ExEnv::out0())
const;
59 std::ostream& operator<<(std::ostream&,
const KeyValValue&);
71 KeyValValue::KeyValValueError doublevalue(
double&)
const;
83 KeyValValue::KeyValValueError booleanvalue(
int&)
const;
95 KeyValValue::KeyValValueError floatvalue(
float&)
const;
107 KeyValValue::KeyValValueError charvalue(
char&)
const;
119 KeyValValue::KeyValValueError intvalue(
int&)
const;
131 KeyValValue::KeyValValueError sizevalue(
size_t&)
const;
143 KeyValValue::KeyValValueError pcharvalue(
const char*&)
const;
144 KeyValValue::KeyValValueError stringvalue(std::string&)
const;
156 KeyValValue::KeyValValueError pcharvalue(
const char*&)
const;
157 KeyValValue::KeyValValueError stringvalue(std::string&)
const;
176 char *_val_to_delete;
181 enum Storage { Copy, Steal, Use };
184 KeyValValueString::Storage s = KeyValValueString::Use);
186 KeyValValueString::Storage s = KeyValValueString::Use);
189 KeyValValue::KeyValValueError doublevalue(
double&)
const;
190 KeyValValue::KeyValValueError booleanvalue(
int&)
const;
191 KeyValValue::KeyValValueError floatvalue(
float&)
const;
192 KeyValValue::KeyValValueError charvalue(
char&)
const;
193 KeyValValue::KeyValValueError intvalue(
int&)
const;
194 KeyValValue::KeyValValueError sizevalue(
size_t&)
const;
195 KeyValValue::KeyValValueError pcharvalue(
const char*&)
const;
196 KeyValValue::KeyValValueError stringvalue(std::string&)
const;