activemq::util::PrimitiveMap Class Reference

Map of named primitives. More...

#include <src/main/activemq/util/PrimitiveMap.h>

Inheritance diagram for activemq::util::PrimitiveMap:
Inheritance graph
[legend]

Public Member Functions

 PrimitiveMap ()
 Default Constructor, creates an empty map.
virtual ~PrimitiveMap ()
 PrimitiveMap (const decaf::util::Map< std::string, PrimitiveValueNode > &source)
 Copy Constructor.
 PrimitiveMap (const PrimitiveMap &source)
 Copy Constructor.
std::string toString () const
 Converts the contents into a formatted string that can be output in a Log File or other debugging tool.
virtual
PrimitiveValueNode::PrimitiveType 
getValueType (const std::string &key) const
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setBool (const std::string &key, bool value)
 Sets the value at key to the specified type.
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setByte (const std::string &key, unsigned char 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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setChar (const std::string &key, char value)
 Sets the value at key to the specified type.
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setShort (const std::string &key, short value)
 Sets the value at key to the specified type.
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setInt (const std::string &key, int value)
 Sets the value at key to the specified type.
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setLong (const std::string &key, long long 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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setFloat (const std::string &key, float 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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setDouble (const std::string &key, double value)
 Sets the value at key to the specified type.
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setString (const std::string &key, const std::string &value)
 Sets the value at key to the specified type.
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 requested value then an exception of type NoSuchElementException is thrown.
virtual void setByteArray (const std::string &key, const std::vector< unsigned char > &value)
 Sets the value at key to the specified type.

Detailed Description

Map of named primitives.


Constructor & Destructor Documentation

activemq::util::PrimitiveMap::PrimitiveMap (  ) 

Default Constructor, creates an empty map.

virtual activemq::util::PrimitiveMap::~PrimitiveMap (  )  [virtual]
activemq::util::PrimitiveMap::PrimitiveMap ( const decaf::util::Map< std::string, PrimitiveValueNode > &  source  ) 

Copy Constructor.

Parameters:
source The Decaf Library Map instance whose elements will be copied into this Map.
activemq::util::PrimitiveMap::PrimitiveMap ( const PrimitiveMap source  ) 

Copy Constructor.

Parameters:
source The PrimitiveMap whose elements will be copied into this Map.

Member Function Documentation

virtual bool activemq::util::PrimitiveMap::getBool ( const std::string &  key  )  const [virtual]

Gets the Boolean value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual unsigned char activemq::util::PrimitiveMap::getByte ( const std::string &  key  )  const [virtual]

Gets the Byte value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual std::vector<unsigned char> activemq::util::PrimitiveMap::getByteArray ( const std::string &  key  )  const [virtual]

Gets the Byte Array value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual char activemq::util::PrimitiveMap::getChar ( const std::string &  key  )  const [virtual]

Gets the Character value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual double activemq::util::PrimitiveMap::getDouble ( const std::string &  key  )  const [virtual]

Gets the Double value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual float activemq::util::PrimitiveMap::getFloat ( const std::string &  key  )  const [virtual]

Gets the Float value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual int activemq::util::PrimitiveMap::getInt ( const std::string &  key  )  const [virtual]

Gets the Integer value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual long long activemq::util::PrimitiveMap::getLong ( const std::string &  key  )  const [virtual]

Gets the Long value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual short activemq::util::PrimitiveMap::getShort ( const std::string &  key  )  const [virtual]

Gets the Short value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual std::string activemq::util::PrimitiveMap::getString ( const std::string &  key  )  const [virtual]

Gets the String value at the given key, if the key is not in the map or cannot be returned as the requested value then an exception of type NoSuchElementException is thrown.

Parameters:
key - the location to return the value from.
Returns:
the value at key in the type requested.
Exceptions:
NoSuchElementException if key is not in the map.
UnSupportedOperationException if the value cannot be converted to the type this method returns
virtual PrimitiveValueNode::PrimitiveType activemq::util::PrimitiveMap::getValueType ( const std::string &  key  )  const [virtual]
Returns:
the numeric type value for the given key if it exists.
Exceptions:
NoSuchElementException if the key is not present in the map.
virtual void activemq::util::PrimitiveMap::setBool ( const std::string &  key,
bool  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setByte ( const std::string &  key,
unsigned char  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setByteArray ( const std::string &  key,
const std::vector< unsigned char > &  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setChar ( const std::string &  key,
char  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setDouble ( const std::string &  key,
double  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setFloat ( const std::string &  key,
float  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setInt ( const std::string &  key,
int  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setLong ( const std::string &  key,
long long  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setShort ( const std::string &  key,
short  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
virtual void activemq::util::PrimitiveMap::setString ( const std::string &  key,
const std::string &  value 
) [virtual]

Sets the value at key to the specified type.

Overwrites any data that was previously at this key or inserts a new element at key.

Parameters:
key - the map key to set or insert.
value - the new value to set at the key location.
std::string activemq::util::PrimitiveMap::toString (  )  const

Converts the contents into a formatted string that can be output in a Log File or other debugging tool.

Returns:
formatted String of all elements in the map.

The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1