#include <WSComplexType.h>
Public Member Functions | |
WSComplexType (const char *name, bool optional=false) | |
WSComplexType (const WSComplexType &other)=default | |
WSComplexType (WSComplexType &&other) noexcept=default | |
~WSComplexType () override=default | |
WSComplexType & | operator= (const WSComplexType &other)=default |
WSComplexType & | operator= (WSComplexType &&other) noexcept=default |
String | className () const override |
void | clear () override |
void | copyFrom (const WSComplexType &other) |
void | load (const xdoc::SNode &input, bool nullLargeData=false) override |
virtual void | load (const sptk::FieldList &input, bool nullLargeData=false) |
virtual void | unload (const xdoc::SNode &output) const |
virtual void | unload (QueryParameterList &output) const |
void | exportTo (const xdoc::SNode &parent, const char *name=nullptr) const override |
bool | isNull () const override |
virtual bool | isOptional () const |
virtual String | toString (bool asJSON=true, bool formatted=false) const |
void | throwIfNull (const String &parentTypeName) const |
void | exportable (bool flag) |
Public Member Functions inherited from sptk::WSType | |
WSType ()=default | |
WSType (const char *name) | |
WSType (const WSType &)=default | |
WSType (WSType &&) noexcept=default | |
WSType & | operator= (const WSType &) |
WSType & | operator= (WSType &&) noexcept |
virtual String | className () const |
virtual String | name () const |
virtual void | owaspCheck (const String &value) |
virtual void | clear ()=0 |
virtual void | load (const xdoc::SNode &attr, bool nullLargeData=false)=0 |
virtual String | asString () const |
virtual bool | isNull () const =0 |
virtual void | exportTo (const xdoc::SNode &parent, const char *name=nullptr) const =0 |
Static Public Member Functions | |
static void | unload (QueryParameterList &output, const char *paramName, const WSBasicType *elementOrAttribute) |
Protected Member Functions | |
bool | loaded () const |
void | setLoaded (bool flag) |
virtual void | _clear () |
const WSFieldIndex & | getFields () const |
void | setElements (const Strings &fieldNames, std::initializer_list< WSType * > fields) |
void | setAttributes (const Strings &fieldNames, std::initializer_list< WSType * > fields) |
virtual void | checkRestrictions () const |
Base type for all user WSDL types
|
inline |
Default constructor
name | Element name |
optional | Element optionality flag |
|
default |
Copy constructor
other | Other object |
|
defaultnoexcept |
Move constructor
other | Other object |
|
overridedefault |
Destructor
|
inlineprotectedvirtual |
Internal clear data
References sptk::WSType::clear().
|
inlineprotectedvirtual |
Optional checking for restrictions
|
inlineoverridevirtual |
Return class name
Reimplemented from sptk::WSType.
|
inlineoverridevirtual |
Clear content and releases allocated memory
Implements sptk::WSType.
void sptk::WSComplexType::copyFrom | ( | const WSComplexType & | other | ) |
Copy data from other object
other | Object to copy from |
|
inline |
If object is exportable, it's included during export to JSON or XML
flag | Exportable flag |
|
overridevirtual |
Unload data to new XML node
parent | Parent XML node where new node is created |
name | Optional name for the child element |
Implements sptk::WSType.
|
overridevirtual |
True if data was not loaded, or if all the fields are null.
Implements sptk::WSType.
|
inlinevirtual |
True is element is optional
|
virtual |
|
overridevirtual |
Loads type data from request XML node
input | XML node |
nullLargeData | Set null for elements with data size > 256 bytes |
Implements sptk::WSType.
|
inlineprotected |
|
default |
Copy assignment
other | Other object |
|
defaultnoexcept |
Move assignment
other | Other object |
|
inlineprotected |
Set loaded flag
flag | If true then object is loaded |
void sptk::WSComplexType::throwIfNull | ( | const String & | parentTypeName | ) | const |
Throw SOAPException is the object is null
parentTypeName | Parent object type name |
|
virtual |
Print element as XML text
asJSON | Output is JSON (true) or XML (false) |
|
virtual |
Unload data to existing XML node
output | Existing XML node |
|
virtual |
|
static |
Unload single element or attribute to DB query parameter
output | Query parameters |
paramName | Quermy parameter name |
elementOrAttribute | Complex type element (not an array!) |