activemq-cpp-3.8.2
PrimitiveList.h
Go to the documentation of this file.
1 
18 #ifndef _ACTIVEMQ_UTIL_PRIMITIVELIST_H_
19 #define _ACTIVEMQ_UTIL_PRIMITIVELIST_H_
20 
21 #include <string>
22 #include <vector>
23 #include <decaf/util/LinkedList.h>
26 #include <stdio.h>
29 
30 namespace activemq{
31 namespace util{
32 
36  class PrimitiveList : public decaf::util::LinkedList<PrimitiveValueNode> {
37  private:
38 
39  PrimitiveValueConverter converter;
40 
41  public:
42 
46  PrimitiveList();
47 
48  virtual ~PrimitiveList();
49 
55 
60  PrimitiveList(const PrimitiveList& src);
61 
67  std::string toString() const;
68 
77  virtual bool getBool(int index) const;
78 
88  virtual void setBool(int index, bool value);
89 
98  virtual unsigned char getByte(int index) const;
99 
109  virtual void setByte(int index, unsigned char value);
110 
119  virtual char getChar(int index) const;
120 
130  virtual void setChar(int index, char value);
131 
140  virtual short getShort(int index) const;
141 
151  virtual void setShort(int index, short value);
152 
161  virtual int getInt(int index) const;
162 
172  virtual void setInt(int index, int value);
173 
182  virtual long long getLong(int index) const;
183 
193  virtual void setLong(int index, long long value);
194 
203  virtual float getFloat(int index) const;
204 
214  virtual void setFloat(int index, float value);
215 
224  virtual double getDouble(int index) const;
225 
235  virtual void setDouble(int index, double value);
236 
245  virtual std::string getString(int index) const;
246 
256  virtual void setString(int index, const std::string& value);
257 
266  virtual std::vector<unsigned char> getByteArray(int index) const;
267 
277  virtual void setByteArray(int index, const std::vector<unsigned char>& value);
278 
279  };
280 
281 }}
282 
283 #endif /*_ACTIVEMQ_UTIL_PRIMITIVELIST_H_*/
virtual void setFloat(int index, float value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
List of primitives.
Definition: PrimitiveList.h:36
virtual void setInt(int index, int value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual void setLong(int index, long long value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual char getChar(int index) const
Gets the Character value at the specified index.
virtual int getInt(int index) const
Gets the Integer value at the specified index.
std::string toString() const
Converts the contents into a formatted string that can be output in a Log File or other debugging too...
PrimitiveList()
Default Constructor, creates an Empty list.
virtual double getDouble(int index) const
Gets the Double value at the specified index.
virtual void setString(int index, const std::string &value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual bool getBool(int index) const
Gets the Boolean value at the specified index.
virtual void setByteArray(int index, const std::vector< unsigned char > &value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual std::string getString(int index) const
Gets the String value at the specified index.
virtual std::vector< unsigned char > getByteArray(int index) const
Gets the Byte Array value at the specified index.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
virtual short getShort(int index) const
Gets the Short value at the specified index.
virtual float getFloat(int index) const
Gets the Float value at the specified index.
virtual void setChar(int index, char value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual unsigned char getByte(int index) const
Gets the Byte value at the specified index.
virtual long long getLong(int index) const
Gets the Long value at the specified index.
virtual void setByte(int index, unsigned char value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual void setShort(int index, short value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
virtual void setBool(int index, bool value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
Class controls the conversion of data contained in a PrimitiveValueNode from one type to another...
Definition: PrimitiveValueConverter.h:54
virtual void setDouble(int index, double value)
Sets the value at the given index to the new value specified, this method overwrites any data that wa...
A complete implementation of the List interface using a doubly linked list data structure.
Definition: LinkedList.h:55