sptk2 logo
SPTK Home Page
Public Types | Public Member Functions | List of all members
sptk::WSRestriction Class Reference

#include <WSRestriction.h>

Public Types

enum class  Type : uint8_t { Unknown , Enumeration , Pattern }
 

Public Member Functions

 WSRestriction (const String &typeName, const xdoc::SNode &simpleTypeElement)
 
 WSRestriction (Type type, const String &wsdlTypeName, const Strings &enumerationsOrPattern)
 
Type type () const
 
void check (const String &typeName, const String &value) const
 
String generateConstructor (const String &variableName) const
 
const std::vector< RegularExpression > & patterns () const
 
Strings enumeration () const
 

Detailed Description

WSDL Restriction

Constructor & Destructor Documentation

◆ WSRestriction() [1/2]

sptk::WSRestriction::WSRestriction ( const String typeName,
const xdoc::SNode &  simpleTypeElement 
)

Constructor from WSDL (XML) definition

Parameters
typeNameWSDL type name
simpleTypeElementSimple type XML node

◆ WSRestriction() [2/2]

sptk::WSRestriction::WSRestriction ( Type  type,
const String wsdlTypeName,
const Strings enumerationsOrPattern 
)

Constructor from WSDL (XML) definition

Parameters
typeRestriction type
wsdlTypeNameWSDL type name
enumerationsOrPatternssEnumerations or patterns

Member Function Documentation

◆ check()

void sptk::WSRestriction::check ( const String typeName,
const String value 
) const

Restriction check

Checks value to satisfy restriction. If value violates restriction, throws exception.

Parameters
typeNameName of the checked type (for error messages)
valueValue to check

◆ enumeration()

Strings sptk::WSRestriction::enumeration ( ) const
inline

Optional enumeration to match

Returns
enumeration

◆ generateConstructor()

String sptk::WSRestriction::generateConstructor ( const String variableName) const

Generates restriction constructor for C++ skeleton

◆ patterns()

const std::vector< RegularExpression > & sptk::WSRestriction::patterns ( ) const
inline

Optional regular expression to match

Returns
regular expression string

◆ type()

Type sptk::WSRestriction::type ( ) const

Get restriction type

Returns
restriction type

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

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