sptk2 logo
SPTK Home Page
Public Types | Public Member Functions | List of all members
sptk::WSArray< T > Class Template Reference

#include <WSArray.h>

Inheritance diagram for sptk::WSArray< T >:
sptk::WSType

Public Types

using value_type = T
 
using iterator = typename std::vector< T >::iterator
 
using const_iterator = typename std::vector< T >::const_iterator
 

Public Member Functions

 WSArray (const char *name="array")
 
String className () const override
 
bool isNull () const override
 
size_t size () const
 
void clear () override
 
bool empty () const
 
T & operator[] (size_t index)
 
const T & operator[] (size_t index) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
T & front ()
 
const T & front () const
 
T & back ()
 
const T & back () const
 
void push_back (const T &value)
 
void push_back (T &&value)
 
void emplace_back (const T &value)
 
void emplace_back (T &&value)
 
void resize (size_t sz)
 
auto erase (const iterator &pos)
 
auto erase (const iterator &first, const iterator &last)
 
void load (const xdoc::SNode &node, bool nullLargeData) override
 
String asString () const override
 
void exportTo (const xdoc::SNode &output, const char *name=nullptr) const override
 
- Public Member Functions inherited from sptk::WSType
 WSType ()=default
 
 WSType (const char *name)
 
 WSType (const WSType &)=default
 
 WSType (WSType &&) noexcept=default
 
WSTypeoperator= (const WSType &)
 
WSTypeoperator= (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
 

Detailed Description

template<typename T>
class sptk::WSArray< T >

Wrapper for WSDL array type

Constructor & Destructor Documentation

◆ WSArray()

template<typename T >
sptk::WSArray< T >::WSArray ( const char *  name = "array")
inlineexplicit

Constructor

Parameters
nameElement name

Member Function Documentation

◆ asString()

template<typename T >
String sptk::WSArray< T >::asString ( ) const
inlineoverridevirtual

Conversion to string

Reimplemented from sptk::WSType.

◆ className()

template<typename T >
String sptk::WSArray< T >::className ( ) const
inlineoverridevirtual

Return class name

Reimplemented from sptk::WSType.

◆ clear()

template<typename T >
void sptk::WSArray< T >::clear ( )
inlineoverridevirtual

Clears content (sets to NULL)

Implements sptk::WSType.

◆ exportTo()

template<typename T >
void sptk::WSArray< T >::exportTo ( const xdoc::SNode &  output,
const char *  name = nullptr 
) const
inlineoverridevirtual

Adds an element to response XML with this object data

Parameters
parentParent XML element
nameOptional name for child element

Implements sptk::WSType.

◆ isNull()

template<typename T >
bool sptk::WSArray< T >::isNull ( ) const
inlineoverridevirtual

Implements sptk::WSType.

◆ load()

template<typename T >
void sptk::WSArray< T >::load ( const xdoc::SNode &  attr,
bool  nullLargeData 
)
inlineoverridevirtual

Loads type data from request XML node

Parameters
attrXML node
nullLargeDataSet null for elements with data size > 256 bytes

Implements sptk::WSType.


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

Fri Oct 14 2022 09:58:47: SPTK 5.4.1