activemq-cpp-3.4.0

src/main/activemq/util/PrimitiveList.h

Go to the documentation of this file.
00001 
00018 #ifndef _ACTIVEMQ_UTIL_PRIMITIVELIST_H_
00019 #define _ACTIVEMQ_UTIL_PRIMITIVELIST_H_
00020 
00021 #include <string>
00022 #include <vector>
00023 #include <decaf/util/LinkedList.h>
00024 #include <decaf/lang/exceptions/UnsupportedOperationException.h>
00025 #include <decaf/lang/exceptions/IndexOutOfBoundsException.h>
00026 #include <stdio.h>
00027 #include <activemq/util/PrimitiveValueNode.h>
00028 #include <activemq/util/PrimitiveValueConverter.h>
00029 
00030 namespace activemq{
00031 namespace util{
00032 
00036     class PrimitiveList : public decaf::util::LinkedList<PrimitiveValueNode> {
00037     private:
00038 
00039         PrimitiveValueConverter converter;
00040 
00041     public:
00042 
00046         PrimitiveList();
00047 
00048         virtual ~PrimitiveList();
00049 
00054         PrimitiveList( const decaf::util::List<PrimitiveValueNode>& src );
00055 
00060         PrimitiveList( const PrimitiveList& src );
00061 
00067         std::string toString() const;
00068 
00077         virtual bool getBool( int index ) const;
00078 
00088         virtual void setBool( int index, bool value );
00089 
00098         virtual unsigned char getByte( int index ) const;
00099 
00109         virtual void setByte( int index, unsigned char value );
00110 
00119         virtual char getChar( int index ) const;
00120 
00130         virtual void setChar( int index, char value );
00131 
00140         virtual short getShort( int index ) const;
00141 
00151         virtual void setShort( int index, short value );
00152 
00161         virtual int getInt( int index ) const;
00162 
00172         virtual void setInt( int index, int value );
00173 
00182         virtual long long getLong( int index ) const;
00183 
00193         virtual void setLong( int index, long long value );
00194 
00203         virtual float getFloat( int index ) const;
00204 
00214         virtual void setFloat( int index, float value );
00215 
00224         virtual double getDouble( int index ) const;
00225 
00235         virtual void setDouble( int index, double value );
00236 
00245         virtual std::string getString( int index ) const;
00246 
00256         virtual void setString( int index, const std::string& value );
00257 
00266         virtual std::vector<unsigned char> getByteArray( int index ) const;
00267 
00277         virtual void setByteArray( int index, const std::vector<unsigned char>& value );
00278 
00279     };
00280 
00281 }}
00282 
00283 #endif /*_ACTIVEMQ_UTIL_PRIMITIVELIST_H_*/