activemq-cpp-3.6.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
PrimitiveValueNode.h
Go to the documentation of this file.
1
18
#ifndef _ACTIVEMQ_UTIL_PRIMITIVEVALUENODE_H_
19
#define _ACTIVEMQ_UTIL_PRIMITIVEVALUENODE_H_
20
21
#include <
activemq/util/Config.h
>
22
#include <
decaf/util/NoSuchElementException.h
>
23
#include <
decaf/util/Map.h
>
24
#include <
decaf/util/List.h
>
25
26
namespace
activemq {
27
namespace
util {
28
38
class
AMQCPP_API
PrimitiveValueNode
{
39
public
:
40
44
enum
PrimitiveType
{
45
NULL_TYPE = 0,
46
BOOLEAN_TYPE = 1,
47
BYTE_TYPE = 2,
48
CHAR_TYPE = 3,
49
SHORT_TYPE = 4,
50
INTEGER_TYPE = 5,
51
LONG_TYPE = 6,
52
DOUBLE_TYPE = 7,
53
FLOAT_TYPE = 8,
54
STRING_TYPE = 9,
55
BYTE_ARRAY_TYPE = 10,
56
MAP_TYPE = 11,
57
LIST_TYPE = 12,
58
BIG_STRING_TYPE = 13
59
};
60
64
union
PrimitiveValue
{
65
66
bool
boolValue
;
67
unsigned
char
byteValue
;
68
char
charValue
;
69
short
shortValue
;
70
int
intValue
;
71
long
long
longValue
;
72
double
doubleValue
;
73
float
floatValue
;
74
std::string*
stringValue
;
75
std::vector<unsigned char>*
byteArrayValue
;
76
decaf::util::List<PrimitiveValueNode>
*
listValue
;
77
decaf::util::Map<std::string, PrimitiveValueNode>
*
mapValue
;
78
79
};
80
81
private
:
82
83
PrimitiveType
valueType;
84
PrimitiveValue
value;
85
86
public
:
87
91
PrimitiveValueNode
();
92
97
PrimitiveValueNode
(
bool
value);
98
103
PrimitiveValueNode
(
unsigned
char
value);
104
109
PrimitiveValueNode
(
char
value);
110
115
PrimitiveValueNode
(
short
value);
116
121
PrimitiveValueNode
(
int
value);
122
127
PrimitiveValueNode
(
long
long
value);
128
133
PrimitiveValueNode
(
float
value);
134
139
PrimitiveValueNode
(
double
value);
140
145
PrimitiveValueNode
(
const
char
* value);
146
151
PrimitiveValueNode
(
const
std::string& value);
152
157
PrimitiveValueNode
(
const
std::vector<unsigned char>& value);
158
163
PrimitiveValueNode
(
const
decaf::util::List<PrimitiveValueNode>
& value);
164
169
PrimitiveValueNode
(
const
decaf::util::Map<std::string, PrimitiveValueNode>
& value);
170
176
PrimitiveValueNode
(
const
PrimitiveValueNode
& node);
177
178
~PrimitiveValueNode
() {
179
clear();
180
}
181
188
PrimitiveValueNode
& operator =(
const
PrimitiveValueNode
& node);
189
194
bool
operator==
(
const
PrimitiveValueNode
& node)
const
;
195
200
PrimitiveType
getType
()
const
{
201
return
valueType;
202
}
203
208
PrimitiveValue
getValue
()
const
{
209
return
this->value;
210
}
211
221
void
setValue(
const
PrimitiveValue& value, PrimitiveType valueType);
222
227
void
clear();
228
235
void
setBool(
bool
value);
236
243
bool
getBool()
const
;
244
251
void
setByte(
unsigned
char
value);
252
259
unsigned
char
getByte()
const
;
260
267
void
setChar(
char
value);
268
275
char
getChar()
const
;
276
283
void
setShort(
short
value);
284
291
short
getShort()
const
;
292
299
void
setInt(
int
value);
300
307
int
getInt()
const
;
308
315
void
setLong(
long
long
value);
316
323
long
long
getLong()
const
;
324
331
void
setFloat(
float
value);
332
339
float
getFloat()
const
;
340
347
void
setDouble(
double
value);
348
355
double
getDouble()
const
;
356
363
void
setString(
const
std::string& value);
364
371
std::string getString()
const
;
372
379
void
setByteArray(
const
std::vector<unsigned char>& value);
380
387
std::vector<unsigned char> getByteArray()
const
;
388
395
void
setList(
const
decaf::util::List<PrimitiveValueNode>
& value);
396
403
const
decaf::util::List<PrimitiveValueNode>
& getList()
const
;
404
411
void
setMap(
const
decaf::util::Map<std::string, PrimitiveValueNode>
& value);
412
419
const
decaf::util::Map<std::string, PrimitiveValueNode>
& getMap()
const
;
420
425
std::string toString()
const
;
426
427
};
428
429
}}
430
431
#endif
/*_ACTIVEMQ_UTIL_PRIMITIVEVALUENODE_H_*/
src
main
activemq
util
PrimitiveValueNode.h
Generated on Mon Mar 4 2013 10:25:45 for activemq-cpp-3.6.0 by
1.8.1.2