Public Member Functions | Protected Attributes

base_soap::SOAPStruct Class Reference

A soap parameter of type structure, that contains other parameters as members. More...

#include <libppbase/base_soap/SOAPStruct.h>

Inheritance diagram for base_soap::SOAPStruct:
base_soap::SOAPRequest base_soap::SOAPResponse

List of all members.

Public Member Functions

 SOAPStruct (xercesc::DOMDocument *document=NULL, xercesc::DOMElement *base=NULL, SOAPTranscoder *transcoder=NULL)
 Constructor.
 ~SOAPStruct ()
 Destructor.
SOAPStructadd (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.
SOAPStructgetStruct (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.

Detailed Description

A soap parameter of type structure, that contains other parameters as members.

Author:
Christoph Schwarz
Version:
Id:
SOAPStruct.h 21 2010-09-05 04:18:17Z cschwarz1

Constructor & Destructor Documentation

base_soap::SOAPStruct::SOAPStruct ( xercesc::DOMDocument *  document = NULL,
xercesc::DOMElement *  base = NULL,
SOAPTranscoder transcoder = NULL 
)

Constructor.

Parameters:
document a dom document
base the base node that contains the struct members
transcoder the transcoder to use for all string transcodings

Member Function Documentation

SOAPStruct* base_soap::SOAPStruct::add ( const base::String name  ) 

Adds a parameter of type soap struct.

Parameters:
name the parameter name
Returns:
the new parameter, the caller must not delete it
void base_soap::SOAPStruct::add ( const base::String name,
bool  value 
)

Adds a parameter of type bool.

Parameters:
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.

Parameters:
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.

Parameters:
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).

Parameters:
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.

Parameters:
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.

Parameters:
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).

Parameters:
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.

Parameters:
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.

Parameters:
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*.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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).

Parameters:
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.

Parameters:
name the parameter name
bool base_soap::SOAPStruct::exists ( const base::String name  )  const

Tests if element exists.

Parameters:
name the parameter name
Returns:
true if it exists, false if not
bool base_soap::SOAPStruct::existsNotNull ( const base::String name  )  const

Tests if element exists and is not null.

Parameters:
name the parameter name
Returns:
true if it exists and is not null, false if not
xercesc::DOMElement* base_soap::SOAPStruct::getBase (  )  const

Returns the base node.

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.

Parameters:
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
Returns:
the parameter value
base::DateTime base_soap::SOAPStruct::getDateTime ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type base::DateTime.

Parameters:
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
Returns:
the parameter value
double base_soap::SOAPStruct::getDouble ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type double.

Parameters:
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
Returns:
the parameter value
int base_soap::SOAPStruct::getInt ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type int.

Parameters:
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
Returns:
the parameter value
long base_soap::SOAPStruct::getLong ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type long.

Parameters:
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
Returns:
the parameter value
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.

Parameters:
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
Returns:
the parameter value
std::map<base::String, base::String>* base_soap::SOAPStruct::getMap ( const base::String name,
bool *  exist = NULL 
) const

Gets a parameter (record).

Parameters:
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
Returns:
the parameter value, the caller must delete it
base::String base_soap::SOAPStruct::getString ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type base::String.

Parameters:
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
Returns:
the parameter value
SOAPStruct* base_soap::SOAPStruct::getStruct ( const base::String name,
bool *  exist = NULL 
)

Gets a parameter of type soap struct.

Parameters:
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
Returns:
the parameter value, the caller must not delete it
std::vector<SOAPStruct*> base_soap::SOAPStruct::getStructArray ( const base::String name,
bool *  exist = NULL 
)

Gets a parameter of type soap struct array.

Parameters:
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
Returns:
the array, the caller must not delete its elements
unsigned int base_soap::SOAPStruct::getUInt ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type unsigned int.

Parameters:
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
Returns:
the parameter value
unsigned long base_soap::SOAPStruct::getULong ( const base::String name,
bool *  exist = NULL,
bool *  isnull = NULL 
) const

Gets a parameter of type unsigned long.

Parameters:
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
Returns:
the parameter value
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.

Parameters:
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
Returns:
the parameter value
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).

Parameters:
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
Returns:
the parameter value, the caller must delete it
std::vector<std::pair<base::String,base::String> >* base_soap::SOAPStruct::getVectorOfPairs ( const base::String name,
bool *  exist = NULL 
) const

Gets a parameter (array).

Parameters:
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
Returns:
the parameter value, the caller must delete it
std::vector<base::String>* base_soap::SOAPStruct::getVectorOfStrings ( const base::String name,
bool *  exist = NULL 
) const

Gets a parameter (array).

Parameters:
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
Returns:
the parameter value, the caller must delete it
void base_soap::SOAPStruct::setTranscoder ( SOAPTranscoder transcoder  ) 

Sets the transcoder to use for all string transcodings.

Parameters:
transcoder the new transcoder

The documentation for this class was generated from the following file: