activemq-cpp-3.4.0
|
Class that wraps around a single value of one of the many types. More...
#include <src/main/activemq/util/PrimitiveValueNode.h>
Data Structures | |
union | PrimitiveValue |
Define a union type comprised of the various types. More... | |
Public Types | |
enum | PrimitiveType { NULL_TYPE = 0, BOOLEAN_TYPE = 1, BYTE_TYPE = 2, CHAR_TYPE = 3, SHORT_TYPE = 4, INTEGER_TYPE = 5, LONG_TYPE = 6, DOUBLE_TYPE = 7, FLOAT_TYPE = 8, STRING_TYPE = 9, BYTE_ARRAY_TYPE = 10, MAP_TYPE = 11, LIST_TYPE = 12, BIG_STRING_TYPE = 13 } |
Enumeration for the various primitive types. More... | |
Public Member Functions | |
PrimitiveValueNode () | |
Default Constructor, creates a value of the NULL_TYPE. | |
PrimitiveValueNode (bool value) | |
Boolean Value Constructor. | |
PrimitiveValueNode (unsigned char value) | |
Byte Value Constructor. | |
PrimitiveValueNode (char value) | |
Char Value Constructor. | |
PrimitiveValueNode (short value) | |
Short Value Constructor. | |
PrimitiveValueNode (int value) | |
Int Value Constructor. | |
PrimitiveValueNode (long long value) | |
Long Value Constructor. | |
PrimitiveValueNode (float value) | |
Float Value Constructor. | |
PrimitiveValueNode (double value) | |
Double Value Constructor. | |
PrimitiveValueNode (const char *value) | |
String Value Constructor. | |
PrimitiveValueNode (const std::string &value) | |
String Value Constructor. | |
PrimitiveValueNode (const std::vector< unsigned char > &value) | |
Byte Array Value Constructor. | |
PrimitiveValueNode (const decaf::util::List< PrimitiveValueNode > &value) | |
Primtive List Constructor. | |
PrimitiveValueNode (const decaf::util::Map< std::string, PrimitiveValueNode > &value) | |
Primtive Map Value Constructor. | |
PrimitiveValueNode (const PrimitiveValueNode &node) | |
Copy constructor. | |
~PrimitiveValueNode () | |
PrimitiveValueNode & | operator= (const PrimitiveValueNode &node) |
Assignment operator, copies the data from the other node. | |
bool | operator== (const PrimitiveValueNode &node) const |
Comparison Operator, compares this node to the other node. | |
PrimitiveType | getType () const |
Gets the Value Type of this type wrapper. | |
PrimitiveValue | getValue () const |
Gets the internal Primitive Value object from this wrapper. | |
void | setValue (const PrimitiveValue &value, PrimitiveType valueType) |
Sets the internal PrimitiveVale object to the new value along with the tag for the type that it consists of. | |
void | clear () |
Clears the value from this wrapper converting it back to a blank NULL_TYPE value. | |
void | setBool (bool value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
bool | getBool () const |
Gets the Boolean value of this Node. | |
void | setByte (unsigned char value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
unsigned char | getByte () const |
Gets the Byte value of this Node. | |
void | setChar (char value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
char | getChar () const |
Gets the Character value of this Node. | |
void | setShort (short value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
short | getShort () const |
Gets the Short value of this Node. | |
void | setInt (int value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
int | getInt () const |
Gets the Integer value of this Node. | |
void | setLong (long long value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
long long | getLong () const |
Gets the Long value of this Node. | |
void | setFloat (float value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
float | getFloat () const |
Gets the Float value of this Node. | |
void | setDouble (double value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
double | getDouble () const |
Gets the Double value of this Node. | |
void | setString (const std::string &value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
std::string | getString () const |
Gets the String value of this Node. | |
void | setByteArray (const std::vector< unsigned char > &value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
std::vector< unsigned char > | getByteArray () const |
Gets the Byte Array value of this Node. | |
void | setList (const decaf::util::List< PrimitiveValueNode > &value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
const decaf::util::List < PrimitiveValueNode > & | getList () const |
Gets the Primitive List value of this Node. | |
void | setMap (const decaf::util::Map< std::string, PrimitiveValueNode > &value) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given. | |
const decaf::util::Map < std::string, PrimitiveValueNode > & | getMap () const |
Gets the Primitive Map value of this Node. | |
std::string | toString () const |
Creates a string representation of this value. |
Class that wraps around a single value of one of the many types.
Manages memory for complex types, such as strings. Note: the destructor was left non-virtual so no virtual table will be created. This probably isn't necessary, but will avoid needless memory allocation. Since we'll never extend this class, not having a virtual destructor isn't a concern.
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | ) |
Default Constructor, creates a value of the NULL_TYPE.
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | bool | value | ) |
Boolean Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | unsigned char | value | ) |
Byte Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | char | value | ) |
Char Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | short | value | ) |
Short Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | int | value | ) |
Int Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | long long | value | ) |
Long Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | float | value | ) |
Float Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | double | value | ) |
Double Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | const char * | value | ) |
String Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | const std::string & | value | ) |
String Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | const std::vector< unsigned char > & | value | ) |
Byte Array Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | const decaf::util::List< PrimitiveValueNode > & | value | ) |
Primtive List Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | const decaf::util::Map< std::string, PrimitiveValueNode > & | value | ) |
Primtive Map Value Constructor.
value | - the new value to store. |
activemq::util::PrimitiveValueNode::PrimitiveValueNode | ( | const PrimitiveValueNode & | node | ) |
Copy constructor.
node | The instance of another node to copy to this one. |
activemq::util::PrimitiveValueNode::~PrimitiveValueNode | ( | ) | [inline] |
void activemq::util::PrimitiveValueNode::clear | ( | ) |
Clears the value from this wrapper converting it back to a blank NULL_TYPE value.
bool activemq::util::PrimitiveValueNode::getBool | ( | ) | const |
Gets the Boolean value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
unsigned char activemq::util::PrimitiveValueNode::getByte | ( | ) | const |
Gets the Byte value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
std::vector<unsigned char> activemq::util::PrimitiveValueNode::getByteArray | ( | ) | const |
Gets the Byte Array value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
char activemq::util::PrimitiveValueNode::getChar | ( | ) | const |
Gets the Character value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
double activemq::util::PrimitiveValueNode::getDouble | ( | ) | const |
Gets the Double value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
float activemq::util::PrimitiveValueNode::getFloat | ( | ) | const |
Gets the Float value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
int activemq::util::PrimitiveValueNode::getInt | ( | ) | const |
Gets the Integer value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
const decaf::util::List<PrimitiveValueNode>& activemq::util::PrimitiveValueNode::getList | ( | ) | const |
Gets the Primitive List value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
long long activemq::util::PrimitiveValueNode::getLong | ( | ) | const |
Gets the Long value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
const decaf::util::Map<std::string, PrimitiveValueNode>& activemq::util::PrimitiveValueNode::getMap | ( | ) | const |
Gets the Primitive Map value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
short activemq::util::PrimitiveValueNode::getShort | ( | ) | const |
Gets the Short value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
std::string activemq::util::PrimitiveValueNode::getString | ( | ) | const |
Gets the String value of this Node.
NoSuchElementException | this node cannot be returned as the requested type. |
PrimitiveType activemq::util::PrimitiveValueNode::getType | ( | ) | const [inline] |
Gets the Value Type of this type wrapper.
PrimitiveValue activemq::util::PrimitiveValueNode::getValue | ( | ) | const [inline] |
Gets the internal Primitive Value object from this wrapper.
PrimitiveValueNode& activemq::util::PrimitiveValueNode::operator= | ( | const PrimitiveValueNode & | node | ) |
Assignment operator, copies the data from the other node.
node | The instance of another node to copy to this one. |
bool activemq::util::PrimitiveValueNode::operator== | ( | const PrimitiveValueNode & | node | ) | const |
Comparison Operator, compares this node to the other node.
void activemq::util::PrimitiveValueNode::setBool | ( | bool | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setByte | ( | unsigned char | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setByteArray | ( | const std::vector< unsigned char > & | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setChar | ( | char | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setDouble | ( | double | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setFloat | ( | float | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setInt | ( | int | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setList | ( | const decaf::util::List< PrimitiveValueNode > & | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setLong | ( | long long | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setMap | ( | const decaf::util::Map< std::string, PrimitiveValueNode > & | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setShort | ( | short | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setString | ( | const std::string & | value | ) |
Sets the value of this value node to the new value specified, this method overwrites any data that was previously at the index given.
value | - the new value to assign to the element at index |
void activemq::util::PrimitiveValueNode::setValue | ( | const PrimitiveValue & | value, |
PrimitiveType | valueType | ||
) |
Sets the internal PrimitiveVale object to the new value along with the tag for the type that it consists of.
value | The value to set as the value contained in this Node. |
valueType | The type of the value being set into this one. |
std::string activemq::util::PrimitiveValueNode::toString | ( | ) | const |
Creates a string representation of this value.