activemq-cpp-3.9.5
PrimitiveMap.h
Go to the documentation of this file.
1
17
18#ifndef _ACTIVEMQ_UTIL_PRIMITIVEMAP_H_
19#define _ACTIVEMQ_UTIL_PRIMITIVEMAP_H_
20
21#include <string>
22#include <vector>
24#include <decaf/util/Config.h>
25#include <decaf/util/StlMap.h>
29
30namespace activemq {
31namespace util {
32
36 class AMQCPP_API PrimitiveMap : public decaf::util::StlMap<std::string, PrimitiveValueNode> {
37 private:
38
40
41 public:
42
47
48 virtual ~PrimitiveMap();
49
57
64 PrimitiveMap(const PrimitiveMap& source);
65
72 std::string toString() const;
73
78 virtual PrimitiveValueNode::PrimitiveType getValueType(const std::string& key) const;
79
91 virtual bool getBool(const std::string& key) const;
92
99 virtual void setBool(const std::string& key, bool value);
100
112 virtual unsigned char getByte(const std::string& key) const;
113
120 virtual void setByte(const std::string& key, unsigned char value);
121
133 virtual char getChar(const std::string& key) const;
134
141 virtual void setChar(const std::string& key, char value);
142
154 virtual short getShort(const std::string& key) const;
155
162 virtual void setShort(const std::string& key, short value);
163
175 virtual int getInt(const std::string& key) const;
176
183 virtual void setInt(const std::string& key, int value);
184
196 virtual long long getLong(const std::string& key) const;
197
204 virtual void setLong(const std::string& key, long long value);
205
217 virtual float getFloat(const std::string& key) const;
218
225 virtual void setFloat(const std::string& key, float value);
226
238 virtual double getDouble(const std::string& key) const;
239
246 virtual void setDouble(const std::string& key, double value);
247
259 virtual std::string getString(const std::string& key) const;
260
267 virtual void setString(const std::string& key, const std::string& value);
268
280 virtual std::vector<unsigned char> getByteArray(const std::string& key) const;
281
288 virtual void setByteArray(const std::string& key, const std::vector<unsigned char>& value);
289
290 };
291
292}}
293
294#endif /*_ACTIVEMQ_UTIL_PRIMITIVEMAP_H_*/
#define AMQCPP_API
Definition Config.h:30
virtual short getShort(const std::string &key) const
Gets the Short value at the given key, if the key is not in the map or cannot be returned as the requ...
virtual void setByte(const std::string &key, unsigned char value)
Sets the value at key to the specified type.
virtual void setChar(const std::string &key, char value)
Sets the value at key to the specified type.
PrimitiveMap(const PrimitiveMap &source)
Copy Constructor.
virtual std::string getString(const std::string &key) const
Gets the String value at the given key, if the key is not in the map or cannot be returned as the req...
virtual void setShort(const std::string &key, short value)
Sets the value at key to the specified type.
virtual void setBool(const std::string &key, bool value)
Sets the value at key to the specified type.
virtual float getFloat(const std::string &key) const
Gets the Float value at the given key, if the key is not in the map or cannot be returned as the requ...
virtual PrimitiveValueNode::PrimitiveType getValueType(const std::string &key) const
std::string toString() const
Converts the contents into a formatted string that can be output in a Log File or other debugging too...
virtual long long getLong(const std::string &key) const
Gets the Long value at the given key, if the key is not in the map or cannot be returned as the reque...
virtual void setInt(const std::string &key, int value)
Sets the value at key to the specified type.
virtual void setDouble(const std::string &key, double value)
Sets the value at key to the specified type.
virtual double getDouble(const std::string &key) const
Gets the Double value at the given key, if the key is not in the map or cannot be returned as the req...
virtual void setString(const std::string &key, const std::string &value)
Sets the value at key to the specified type.
virtual void setFloat(const std::string &key, float value)
Sets the value at key to the specified type.
virtual char getChar(const std::string &key) const
Gets the Character value at the given key, if the key is not in the map or cannot be returned as the ...
virtual std::vector< unsigned char > getByteArray(const std::string &key) const
Gets the Byte Array value at the given key, if the key is not in the map or cannot be returned as the...
virtual bool getBool(const std::string &key) const
Gets the Boolean value at the given key, if the key is not in the map or cannot be returned as the re...
virtual int getInt(const std::string &key) const
Gets the Integer value at the given key, if the key is not in the map or cannot be returned as the re...
virtual unsigned char getByte(const std::string &key) const
Gets the Byte value at the given key, if the key is not in the map or cannot be returned as the reque...
virtual void setByteArray(const std::string &key, const std::vector< unsigned char > &value)
Sets the value at key to the specified type.
virtual void setLong(const std::string &key, long long value)
Sets the value at key to the specified type.
PrimitiveMap(const decaf::util::Map< std::string, PrimitiveValueNode > &source)
Copy Constructor.
PrimitiveMap()
Default Constructor, creates an empty map.
Class controls the conversion of data contained in a PrimitiveValueNode from one type to another.
Definition PrimitiveValueConverter.h:54
PrimitiveType
Enumeration for the various primitive types.
Definition PrimitiveValueNode.h:44
An object that maps keys to values.
Definition Map.h:88
Map template that wraps around a std::map to provide a more user-friendly interface and to provide co...
Definition StlMap.h:48
Definition ActiveMQMessageTransformation.h:36
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24