#include <it_bus/any.h>
Inheritance diagram for IT_Bus::Any:
The xsd:any is a wildcard element that matches any element (or multiple elements, if occurrence constraints are set), subject to certain constraints.
This class is not required to be thread-safe, if thread safety is required the caller should use synchronization primitives (like Mutex) to access this class.
Definition at line 38 of file any.h.
Public Types | |
typedef IT_Reflect::ComplexValueRef< Any > | IT_ReflectionType |
Public Member Functions | |
Any () | |
Default constructor. | |
Any (const char *process_contents, const NamespaceConstraints &namespace_constraints, const char *any_namespace) | |
Any constructor. | |
virtual | ~Any () |
Destructor. | |
Any (const Any &rhs) | |
Copy constructor. | |
Any & | operator= (const Any &other) |
Assignment operator. | |
AnyType & | copy (const AnyType &other) |
Any now holds a copy of the contents from other, and returns a reference to self. | |
const QName & | get_type () const |
Returns the type of the element that this Any holds. | |
Kind | get_kind () const |
Returns the IT_Bus::AnyType::Kind for the Any class (if not overridden). | |
void | read (const QName &name, ComplexTypeReader &reader) IT_THROW_DECL((DeserializationException)) |
Read the element from the stream using the Reader. | |
void | write (const QName &name, ComplexTypeWriter &writer) const IT_THROW_DECL((SerializationException)) |
Write the element into the stream using the Writer. | |
void | set_process_contents (const String &pc) |
Set the process contents constraint for this Any. | |
void | set_namespace_constraints (const NamespaceConstraints &ns) |
Set the namespace constraint for this Any. | |
void | set_any_namespace (const String &ns) |
Set the target namespace for this Any. | |
void | set_string_data (const String &value, const QName &element_name=QName::EMPTY_QNAME) |
Set the data into any as XML. | |
void | set_boolean (const Boolean &value, const QName &element_name) |
Set an element of type boolean into the Any. | |
void | set_byte (const Byte &value, const QName &element_name) |
Set an element of type byte into the Any. | |
void | set_short (const Short &value, const QName &element_name) |
Set an element of type Short into the Any. | |
void | set_int (const Int &value, const QName &element_name) |
Set an element of type Int into the Any. | |
void | set_long (const Long &value, const QName &element_name) |
Set an element of type Long into the Any. | |
void | set_string (const String &value, const QName &element_name) |
Set an element of type String into the Any. | |
void | set_QName (const QName &value, const QName &element_name) |
Set an element of type QName into the Any. | |
void | set_float (const Float &value, const QName &element_name) |
Set an element of type Float into the Any. | |
void | set_double (const Double &value, const QName &element_name) |
Set an element of type Double into the Any. | |
void | set_ubyte (const UByte &value, const QName &element_name) |
Set an element of type UByte into the Any. | |
void | set_ushort (const UShort &value, const QName &element_name) |
Set an element of type UShort into the Any. | |
void | set_uint (const UInt &value, const QName &element_name) |
Set an element of type UInt into the Any. | |
void | set_ulong (const ULong &value, const QName &element_name) |
Set an element of type ULong into the Any. | |
void | set_decimal (const Decimal &value, const QName &element_name) |
Set an element of type Decimal into the Any. | |
void | set_any_type (const AnyType &value, const QName &element_name) |
Set an element of type AnyType (or its derived type) into the Any. | |
QName | get_element_name () const |
Get the name of the element within the Any. | |
String | get_process_contents () const |
Get the process contents constraint for this Any. | |
const NamespaceConstraints & | get_namespace_constraints () const |
Get the namespace constraints for this Any. | |
String | get_any_namespace () const |
Get the target namespace for this Any. | |
String | get_string_data () const |
Get the element in Any as a well formed XML string. | |
const AnyType * | get_any_type () const |
Get the element in Any as an AnyType. | |
Boolean | get_boolean () const |
Get the value in the Any as boolean. | |
Byte | get_byte () const |
Get the value in the Any as Byte. | |
Short | get_short () const |
Get the value in the Any as Short. | |
Int | get_int () const |
Get the value in the Any as Int. | |
Long | get_long () const |
Get the value in the Any as Long. | |
String | get_string () const |
Get the value in the Any as String. | |
QName | get_QName () const |
Get the value in the Any as QName. | |
Float | get_float () const |
Get the value in the Any as Float. | |
Double | get_double () const |
Get the value in the Any as Double. | |
UByte | get_ubyte () const |
Get the value in the Any as UByte. | |
UShort | get_ushort () const |
Get the value in the Any as UShort. | |
UInt | get_uint () const |
Get the value in the Any as UInt. | |
ULong | get_ulong () const |
Get the value in the Any as ULong. | |
Decimal | get_decimal () const |
Get the value in the Any as Decimal. | |
virtual bool | validate_contents () const |
Validate the Any's contents for process contents and namespace validation constraints. | |
virtual bool | validate_namespace () const |
Validate the Any's contents for namespace validation constraints only. | |
Public Attributes | |
virtual IT_Reflect::Reflection *virtual get_reflection() IT_THROW_DECL((IT_Reflect const IT_Reflect::Reflection *friend class() const IT_THROW_DECL((IT_Reflect | AnyStreamable |
Return an instance of the IT_Reflect::Reflection type that encapsulates this instance. | |
Private Attributes | |
String | m_process_contents |
NamespaceConstraints | m_namespace_constraints |
String | m_any_namespace |
String | m_string_data |
QName | m_element_name |
AnyType * | m_any_data |
IT_Bus::Any::Any | ( | const char * | process_contents, | |
const NamespaceConstraints & | namespace_constraints, | |||
const char * | any_namespace | |||
) |
Any constructor.
const | char* |
const | NamespaceConstraints& |
const | char* Target namespace of xsd:Any in schema |
String IT_Bus::Any::get_any_namespace | ( | ) | const |
const AnyType* IT_Bus::Any::get_any_type | ( | ) | const |
Boolean IT_Bus::Any::get_boolean | ( | ) | const |
Get the value in the Any as boolean.
IT_bad_cast | exception thrown if the element is not of this type |
Byte IT_Bus::Any::get_byte | ( | ) | const |
Get the value in the Any as Byte.
IT_bad_cast | exception thrown if the element is not of this type |
Decimal IT_Bus::Any::get_decimal | ( | ) | const |
Get the value in the Any as Decimal.
IT_bad_cast | exception thrown if the element is not of this type |
Double IT_Bus::Any::get_double | ( | ) | const |
Get the value in the Any as Double.
IT_bad_cast | exception thrown if the element is not of this type |
QName IT_Bus::Any::get_element_name | ( | ) | const |
Float IT_Bus::Any::get_float | ( | ) | const |
Get the value in the Any as Float.
IT_bad_cast | exception thrown if the element is not of this type |
Int IT_Bus::Any::get_int | ( | ) | const |
Get the value in the Any as Int.
IT_bad_cast | exception thrown if the element is not of this type |
Kind IT_Bus::Any::get_kind | ( | ) | const [virtual] |
Returns the IT_Bus::AnyType::Kind for the Any class (if not overridden).
Reimplemented from IT_Bus::AnyType.
Long IT_Bus::Any::get_long | ( | ) | const |
Get the value in the Any as Long.
IT_bad_cast | exception thrown if the element is not of this type |
const NamespaceConstraints& IT_Bus::Any::get_namespace_constraints | ( | ) | const |
String IT_Bus::Any::get_process_contents | ( | ) | const |
QName IT_Bus::Any::get_QName | ( | ) | const |
Short IT_Bus::Any::get_short | ( | ) | const |
Get the value in the Any as Short.
IT_bad_cast | exception thrown if the element is not of this type |
String IT_Bus::Any::get_string | ( | ) | const |
String IT_Bus::Any::get_string_data | ( | ) | const |
const QName& IT_Bus::Any::get_type | ( | ) | const [virtual] |
Returns the type of the element that this Any holds.
Implements IT_Bus::AnyType.
UByte IT_Bus::Any::get_ubyte | ( | ) | const |
Get the value in the Any as UByte.
IT_bad_cast | exception thrown if the element is not of this type |
UInt IT_Bus::Any::get_uint | ( | ) | const |
Get the value in the Any as UInt.
IT_bad_cast | exception thrown if the element is not of this type |
ULong IT_Bus::Any::get_ulong | ( | ) | const |
Get the value in the Any as ULong.
IT_bad_cast | exception thrown if the element is not of this type |
UShort IT_Bus::Any::get_ushort | ( | ) | const |
Get the value in the Any as UShort.
IT_bad_cast | exception thrown if the element is not of this type |
void IT_Bus::Any::read | ( | const QName & | name, | |
ComplexTypeReader & | reader | |||
) |
void IT_Bus::Any::set_any_namespace | ( | const String & | ns | ) |
void IT_Bus::Any::set_namespace_constraints | ( | const NamespaceConstraints & | ns | ) |
Set the namespace constraint for this Any.
const | NamespaceConstraints& Array of string(s) as defined in schema |
void IT_Bus::Any::set_process_contents | ( | const String & | pc | ) |
void IT_Bus::Any::set_string_data | ( | const String & | value, | |
const QName & | element_name = QName::EMPTY_QNAME | |||
) |
virtual bool IT_Bus::Any::validate_contents | ( | ) | const [virtual] |
Validate the Any's contents for process contents and namespace validation constraints.
virtual bool IT_Bus::Any::validate_namespace | ( | ) | const [virtual] |
Validate the Any's contents for namespace validation constraints only.
void IT_Bus::Any::write | ( | const QName & | name, | |
ComplexTypeWriter & | writer | |||
) | const |
virtual IT_Reflect::Reflection* virtual get_reflection () IT_THROW_DECL((IT_Reflect const IT_Reflect::Reflection* friend class () const IT_THROW_DECL((IT_Reflect IT_Bus::Any::AnyStreamable |
Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
IT_Reflect::ReflectException |