HydraExpress™ C++ 2020 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Container for holding class instances that represent members of XML Binding classes. More...
#include <rwsf/xmlbinding/Member.h>
Public Member Functions | |
Member () | |
virtual int | exists (const rwsf::XmlName &member) |
virtual std::vector< Member > | get (const rwsf::XmlName &member) |
virtual void | set (const rwsf::XmlName &member, const std::vector< Member > &values) |
Public Member Functions inherited from rwsf::HandleBase | |
bool | isValid (void) const |
bool | operator!= (const HandleBase &second) const |
bool | operator== (const HandleBase &second) const |
Static Public Member Functions | |
template<class T > | |
static Member | createPrimitive (const T &value) |
template<class T > | |
static Member | createTyped (const T &value) |
static int | exists (rwsf::Member m, std::string xpath) |
static std::vector< rwsf::Member > | get (rwsf::Member m, std::string xpath) |
static std::vector< rwsf::Member > | get (rwsf::Member m, std::string xpath, const rwsf::XmlNamespaceStack &nsStack) |
static void | set (rwsf::Member m, std::string xpath, const std::vector< rwsf::Member > &values) |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
void | operator>> (const Member &m, T &value) |
Additional Inherited Members | |
Protected Member Functions inherited from rwsf::HandleBase | |
HandleBase (void) | |
HandleBase (StaticCtor) | |
HandleBase (BodyBase *body) | |
HandleBase (const HandleBase &second) | |
virtual | ~HandleBase (void) |
BodyBase & | body (void) const |
HandleBase & | operator= (const HandleBase &second) |
Class rwsf::Member is a container for holding class instances that represent members of XML Binding classes. rwsf::Member instances provide a generic way of returning values using the get()
interface and of passing values using the set()
interface of each XML Binding class.
|
inline |
Constructs an empty member handle.
|
inlinestatic |
Returns a new rwsf::Member instance templatized on a primitive type. As a primitive type, this instance contains no instances of nested classes, and so has no generic get()
, set()
, and exists()
methods.
|
inlinestatic |
Returns a new rwsf::Member instance templatized on code-generated types representing XML Schema complex content an XML type. This instance provides generic get()
, set()
, and exists()
methods to access its members.
|
inlinevirtual |
Determines whether the specified member exists within this
. If the member contains an array of elements (maxOccurs>1
), returns its length. If the member contains a single element, returns 1
. If member does not exist, returns -1
.
|
static |
Determines whether xpath represents a valid path to the member contained by rwsf::Member m.
Return values are:
The XPath expression must be relative, beginning either with a dot (.) or with an identifier. The leaf node may be either an element or an attribute. For attributes, you can use the "@" character for clarity, but it is not required.
These are the restrictions when creating a new member for a valid path that lacks a member:
|
inlinevirtual |
Returns the values associated with the child member named member as a vector.
|
static |
A generic get
that supports access to nested members by name without having to specify the type of the member. This method uses the XPath expression xpath to return the values for nested members contained in rwsf::Member m. The return vector contains rwsf::Member instances that wrap the values of the elements or attributes contained in the member.
The XPath expression must be relative, beginning either with a dot (.) or with an identifier. The leaf node may be either an element or an attribute. For attributes, you can use the "@" character for clarity, but it is not required.
If the path is valid but the member does not exist, the method returns an empty vector. If the path is not valid, the method throws an rwsf::Exception.
|
static |
A generic get
that supports access to nested members by name without having to specify the type of the member. This method uses the XPath expression xpath to return the values for nested members contained in rwsf::Member m. The return vector contains rwsf::Member instances that wrap the values of the elements or attributes contained in the member.
The XPath expression must be relative, beginning either with a dot (.) or with an identifier. The leaf node may be either an element or an attribute. For attributes, you can use the "@" character for clarity, but it is not required.
If the path is valid but the member does not exist, the method returns an empty vector. If the path is not valid, the method throws an rwsf::Exception.
The namespace stack parameter nsStack allows member names qualified with a namespace to be resolved.
|
inlinevirtual |
Sets the values of the child member named member, using the data in the rwsf::Member instances contained in the vector values.
|
static |
A generic set
that supports setting the values of nested members by name without having to specify the type of the member. This method uses the XPath expression xpath to set the values for a nested member contained in rwsf::Member m based on the values contained in values.
The XPath expression must relative, beginning either with a dot (.) or with an identifier. The leaf node may be either an element or an attribute. For attributes, you can use the "@" character for clarity, but it is not required.
If the path is valid but m does not exist, this method creates it.
If the path is not valid, this method throws an rwsf::Exception.
|
related |
Stores the value of m in value.
Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. |