A soap parameter of type structure, that contains other parameters as members. More...
#include <libppbase/base_soap/SOAPStruct.h>
Public Member Functions | |
SOAPStruct (xercesc::DOMDocument *document=NULL, xercesc::DOMElement *base=NULL, SOAPTranscoder *transcoder=NULL) | |
Constructor. | |
~SOAPStruct () | |
Destructor. | |
SOAPStruct * | add (const base::String &name) |
Adds a parameter of type soap struct. | |
void | add (const base::String &name, bool value) |
Adds a parameter of type bool. | |
void | add (const base::String &name, const base::DateTime &value) |
Adds a parameter of type base::DateTime. | |
void | add (const base::String &name, double value) |
Adds a parameter of type double. | |
void | add (const base::String &name, int value) |
Adds a parameter of type int. | |
void | add (const base::String &name, unsigned int value) |
Adds a parameter of type unsigned int. | |
void | add (const base::String &name, long value) |
Adds a parameter of type long. | |
void | add (const base::String &name, unsigned long value) |
Adds a parameter of type unsigned long. | |
void | add (const base::String &name, base::longlong_t value) |
Adds a parameter of type longlong_t. | |
void | add (const base::String &name, base::u_longlong_t value) |
Adds a parameter of type u_longlong_t. | |
void | add (const base::String &name, const char *value) |
Adds a parameter of type const char*. | |
void | add (const base::String &name, const base::String &value) |
Adds a parameter of type base::String. | |
void | add (const std::vector< base::String > &names, const std::vector< base::String > &values) |
Adds variable=value pairs. | |
void | add (const base::String &name, const std::vector< base::String > &names, const std::vector< base::String > &values) |
Adds variable=value pairs. | |
void | add (const base::String &name, const std::vector< std::pair< base::String, base::String > > &value, bool lower=true) |
Adds a list of variable=value pairs (record). | |
void | add (const base::String &name, const std::map< base::String, base::String > &value, bool lower=true) |
Adds a list of variable=value pairs (record). | |
void | add (const base::String &name, const std::vector< base::String > &value) |
Adds an array of Strings. | |
void | add (const base::String &name, const std::vector< std::map< base::String, base::String > > &value, bool lower=true) |
Adds an array of lists of variable=value pairs (array of records). | |
void | erase (const base::String &name) |
Erases an parameter. | |
bool | exists (const base::String &name) const |
Tests if element exists. | |
bool | existsNotNull (const base::String &name) const |
Tests if element exists and is not null. | |
xercesc::DOMElement * | getBase () const |
Returns the base node. | |
bool | getBool (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type bool. | |
base::DateTime | getDateTime (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type base::DateTime. | |
double | getDouble (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type double. | |
int | getInt (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type int. | |
long | getLong (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type long. | |
base::longlong_t | getLongLong (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type longlong_t. | |
std::map< base::String, base::String > * | getMap (const base::String &name, bool *exist=NULL) const |
Gets a parameter (record). | |
base::String | getString (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type base::String. | |
SOAPStruct * | getStruct (const base::String &name, bool *exist=NULL) |
Gets a parameter of type soap struct. | |
std::vector< SOAPStruct * > | getStructArray (const base::String &name, bool *exist=NULL) |
Gets a parameter of type soap struct array. | |
unsigned int | getUInt (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type unsigned int. | |
unsigned long | getULong (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type unsigned long. | |
base::u_longlong_t | getULongLong (const base::String &name, bool *exist=NULL, bool *isnull=NULL) const |
Gets a parameter of type u_longlong_t. | |
std::vector< std::pair < base::String, base::String > > * | getVectorOfPairs (const base::String &name, bool *exist=NULL) const |
Gets a parameter (array). | |
std::vector< base::String > * | getVectorOfStrings (const base::String &name, bool *exist=NULL) const |
Gets a parameter (array). | |
std::vector< std::map < base::String, base::String > > * | getVectorOfMaps (const base::String &name, bool *exist=NULL) const |
Gets a parameter (array of records). | |
void | setTranscoder (SOAPTranscoder *transcoder) |
Sets the transcoder to use for all string transcodings. | |
Protected Attributes | |
xercesc::DOMElement * | _base |
The base node in the dom document. | |
xercesc::DOMDocument * | _document |
The dom document associated with this struct. | |
std::vector< SOAPStruct * > | _structs |
A list of soap structs to delete. | |
SOAPTranscoder * | _transcoder |
The transcoder to use with this object. |
A soap parameter of type structure, that contains other parameters as members.
base_soap::SOAPStruct::SOAPStruct | ( | xercesc::DOMDocument * | document = NULL , |
|
xercesc::DOMElement * | base = NULL , |
|||
SOAPTranscoder * | transcoder = NULL | |||
) |
Constructor.
document | a dom document | |
base | the base node that contains the struct members | |
transcoder | the transcoder to use for all string transcodings |
SOAPStruct* base_soap::SOAPStruct::add | ( | const base::String & | name | ) |
Adds a parameter of type soap struct.
name | the parameter name |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
bool | value | |||
) |
Adds a parameter of type bool.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
double | value | |||
) |
Adds a parameter of type double.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
unsigned long | value | |||
) |
Adds a parameter of type unsigned long.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const std::map< base::String, base::String > & | value, | |||
bool | lower = true | |||
) |
Adds a list of variable=value pairs (record).
name | the parameter name | |
value | the parameter value | |
lower | true to convert the element names to lowercase |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const std::vector< base::String > & | value | |||
) |
Adds an array of Strings.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
base::longlong_t | value | |||
) |
Adds a parameter of type longlong_t.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const std::vector< std::map< base::String, base::String > > & | value, | |||
bool | lower = true | |||
) |
Adds an array of lists of variable=value pairs (array of records).
name | the parameter name | |
value | the parameter value | |
lower | true to convert the element names to lowercase |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
int | value | |||
) |
Adds a parameter of type int.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
base::u_longlong_t | value | |||
) |
Adds a parameter of type u_longlong_t.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const char * | value | |||
) |
Adds a parameter of type const char*.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const base::DateTime & | value | |||
) |
Adds a parameter of type base::DateTime.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
unsigned int | value | |||
) |
Adds a parameter of type unsigned int.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const base::String & | value | |||
) |
Adds a parameter of type base::String.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const std::vector< base::String > & | names, | |
const std::vector< base::String > & | values | |||
) |
Adds variable=value pairs.
names | vector containing the variable names | |
values | vector containing the variable values |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
long | value | |||
) |
Adds a parameter of type long.
name | the parameter name | |
value | the parameter value |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const std::vector< base::String > & | names, | |||
const std::vector< base::String > & | values | |||
) |
Adds variable=value pairs.
name | the parameter name | |
names | vector containing the variable names | |
values | vector containing the variable values |
void base_soap::SOAPStruct::add | ( | const base::String & | name, | |
const std::vector< std::pair< base::String, base::String > > & | value, | |||
bool | lower = true | |||
) |
Adds a list of variable=value pairs (record).
name | the parameter name | |
value | the parameter value | |
lower | true to convert the element names to lowercase |
void base_soap::SOAPStruct::erase | ( | const base::String & | name | ) |
Erases an parameter.
name | the parameter name |
bool base_soap::SOAPStruct::exists | ( | const base::String & | name | ) | const |
Tests if element exists.
name | the parameter name |
bool base_soap::SOAPStruct::existsNotNull | ( | const base::String & | name | ) | const |
Tests if element exists and is not null.
name | the parameter name |
xercesc::DOMElement* base_soap::SOAPStruct::getBase | ( | ) | const |
Returns the base node.
bool base_soap::SOAPStruct::getBool | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type bool.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
base::DateTime base_soap::SOAPStruct::getDateTime | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type base::DateTime.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
double base_soap::SOAPStruct::getDouble | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type double.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
int base_soap::SOAPStruct::getInt | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type int.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
long base_soap::SOAPStruct::getLong | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type long.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
base::longlong_t base_soap::SOAPStruct::getLongLong | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type longlong_t.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
std::map<base::String, base::String>* base_soap::SOAPStruct::getMap | ( | const base::String & | name, | |
bool * | exist = NULL | |||
) | const |
Gets a parameter (record).
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown |
base::String base_soap::SOAPStruct::getString | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type base::String.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not |
SOAPStruct* base_soap::SOAPStruct::getStruct | ( | const base::String & | name, | |
bool * | exist = NULL | |||
) |
Gets a parameter of type soap struct.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown |
std::vector<SOAPStruct*> base_soap::SOAPStruct::getStructArray | ( | const base::String & | name, | |
bool * | exist = NULL | |||
) |
Gets a parameter of type soap struct array.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown |
unsigned int base_soap::SOAPStruct::getUInt | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type unsigned int.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
unsigned long base_soap::SOAPStruct::getULong | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type unsigned long.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
base::u_longlong_t base_soap::SOAPStruct::getULongLong | ( | const base::String & | name, | |
bool * | exist = NULL , |
|||
bool * | isnull = NULL | |||
) | const |
Gets a parameter of type u_longlong_t.
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown | |
isnull | returns true if the parameter is null, false if not. if isnull is null and the result is null, an exception is thrown |
std::vector<std::map<base::String,base::String> >* base_soap::SOAPStruct::getVectorOfMaps | ( | const base::String & | name, | |
bool * | exist = NULL | |||
) | const |
Gets a parameter (array of records).
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown |
std::vector<std::pair<base::String,base::String> >* base_soap::SOAPStruct::getVectorOfPairs | ( | const base::String & | name, | |
bool * | exist = NULL | |||
) | const |
Gets a parameter (array).
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown |
std::vector<base::String>* base_soap::SOAPStruct::getVectorOfStrings | ( | const base::String & | name, | |
bool * | exist = NULL | |||
) | const |
Gets a parameter (array).
name | the parameter name | |
exist | returns true if the parameter exists, false if not. if exist is null and the result does not exist, an exception is thrown |
void base_soap::SOAPStruct::setTranscoder | ( | SOAPTranscoder * | transcoder | ) |
Sets the transcoder to use for all string transcodings.
transcoder | the new transcoder |