|
activemq-cpp-3.9.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. More... | |
| PrimitiveValueNode (bool value) | |
| Boolean Value Constructor. More... | |
| PrimitiveValueNode (unsigned char value) | |
| Byte Value Constructor. More... | |
| PrimitiveValueNode (char value) | |
| Char Value Constructor. More... | |
| PrimitiveValueNode (short value) | |
| Short Value Constructor. More... | |
| PrimitiveValueNode (int value) | |
| Int Value Constructor. More... | |
| PrimitiveValueNode (long long value) | |
| Long Value Constructor. More... | |
| PrimitiveValueNode (float value) | |
| Float Value Constructor. More... | |
| PrimitiveValueNode (double value) | |
| Double Value Constructor. More... | |
| PrimitiveValueNode (const char *value) | |
| String Value Constructor. More... | |
| PrimitiveValueNode (const std::string &value) | |
| String Value Constructor. More... | |
| PrimitiveValueNode (const std::vector< unsigned char > &value) | |
| Byte Array Value Constructor. More... | |
| PrimitiveValueNode (const decaf::util::List< PrimitiveValueNode > &value) | |
| Primtive List Constructor. More... | |
| PrimitiveValueNode (const decaf::util::Map< std::string, PrimitiveValueNode > &value) | |
| Primtive Map Value Constructor. More... | |
| PrimitiveValueNode (const PrimitiveValueNode &node) | |
| Copy constructor. More... | |
| ~PrimitiveValueNode () | |
| PrimitiveValueNode & | operator= (const PrimitiveValueNode &node) |
| Assignment operator, copies the data from the other node. More... | |
| bool | operator== (const PrimitiveValueNode &node) const |
| Comparison Operator, compares this node to the other node. More... | |
| PrimitiveType | getType () const |
| Gets the Value Type of this type wrapper. More... | |
| PrimitiveValue | getValue () const |
| Gets the internal Primitive Value object from this wrapper. More... | |
| 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. More... | |
| void | clear () |
| Clears the value from this wrapper converting it back to a blank NULL_TYPE value. More... | |
| 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. More... | |
| bool | getBool () const |
| Gets the Boolean value of this Node. More... | |
| 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. More... | |
| unsigned char | getByte () const |
| Gets the Byte value of this Node. More... | |
| 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. More... | |
| char | getChar () const |
| Gets the Character value of this Node. More... | |
| 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. More... | |
| short | getShort () const |
| Gets the Short value of this Node. More... | |
| 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. More... | |
| int | getInt () const |
| Gets the Integer value of this Node. More... | |
| 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. More... | |
| long long | getLong () const |
| Gets the Long value of this Node. More... | |
| 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. More... | |
| float | getFloat () const |
| Gets the Float value of this Node. More... | |
| 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. More... | |
| double | getDouble () const |
| Gets the Double value of this Node. More... | |
| 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. More... | |
| std::string | getString () const |
| Gets the String value of this Node. More... | |
| 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. More... | |
| std::vector< unsigned char > | getByteArray () const |
| Gets the Byte Array value of this Node. More... | |
| 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. More... | |
| const decaf::util::List < PrimitiveValueNode > & | getList () const |
| Gets the Primitive List value of this Node. More... | |
| 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. More... | |
| const decaf::util::Map < std::string, PrimitiveValueNode > & | getMap () const |
| Gets the Primitive Map value of this Node. More... | |
| std::string | toString () const |
| Creates a string representation of this value. More... | |
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. |
|
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. |
|
inline |
Gets the Value Type of this type wrapper.
|
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.