bpmn++
A BPMN parser library, written in C++
Loading...
Searching...
No Matches
XML Namespace Reference

The XML namespace contains classes representing XML-nodes defined in given XML-schema(s).

Namespaces

namespace  bpmn
 The XML::bpmn namespace contains classes from the following XML-schema(s): xsd/DC.xsd, xsd/DI.xsd, xsd/BPMNDI.xsd, xsd/Semantic.xsd, xsd/BPMN20.xsd.

Classes

struct  Value
 A struct representing the value of an XML-node attribute. More...
struct  Attribute
 A struct representing an attribute of an XML-node. More...
class  XMLObject
 A class representing a node in an XML-tree. More...

Typedefs

typedef std::string ClassName
typedef std::string ElementName
typedef std::string TextContent
typedef std::string Namespace
typedef std::string AttributeName
typedef std::vector< AttributeAttributes
typedef std::vector< std::unique_ptr< XMLObject > > Children
typedef std::unordered_map< ElementName, XMLObject *(*)(const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element)> Factory
 Factory used to create instance depending on element name.
template<typename Self, typename T>
using like_const_t = std::conditional_t<std::is_const_v<std::remove_reference_t<Self>>, const T, T>
 Yields const T when the deduced Self is a const-qualified object, otherwise T.

Functions

std::string transcode (const XMLCh *xmlChStr)
std::ostream & operator<< (std::ostream &os, const XMLObject *obj)
 Allows printing of stringified XML object.
std::ostream & operator<< (std::ostream &os, const XMLObject &obj)
 Allows printing of stringified XML object.
template<typename T>
XMLObjectcreateInstance (const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element)
 Template function used to store in factory.

Typedef Documentation

◆ AttributeName

typedef std::string XML::AttributeName

Definition at line 27 of file XMLObject.h.

◆ Attributes

typedef std::vector<Attribute> XML::Attributes

Definition at line 82 of file XMLObject.h.

◆ Children

typedef std::vector<std::unique_ptr<XMLObject> > XML::Children

Definition at line 83 of file XMLObject.h.

◆ ClassName

typedef std::string XML::ClassName

Definition at line 23 of file XMLObject.h.

◆ ElementName

typedef std::string XML::ElementName

Definition at line 24 of file XMLObject.h.

◆ Factory

typedef std::unordered_map<ElementName, XMLObject* (*)(const Namespace& xmlns, const ClassName& className, const xercesc::DOMElement* element)> XML::Factory

Definition at line 89 of file XMLObject.h.

◆ like_const_t

template<typename Self, typename T>
using XML::like_const_t = std::conditional_t<std::is_const_v<std::remove_reference_t<Self>>, const T, T>

Used together with C++23 explicit object parameters ("deducing this") so that a single accessor definition returns const-qualified references from a const object and mutable references from a mutable object. This is needed because child access goes through std::unique_ptr<XMLObject>, which does not propagate the object's const-ness to the pointee on its own.

Definition at line 101 of file XMLObject.h.

◆ Namespace

typedef std::string XML::Namespace

Definition at line 26 of file XMLObject.h.

◆ TextContent

typedef std::string XML::TextContent

Definition at line 25 of file XMLObject.h.

Function Documentation

◆ createInstance()

template<typename T>
XMLObject * XML::createInstance ( const Namespace & xmlns,
const ClassName & className,
const xercesc::DOMElement * element )

Definition at line 86 of file XMLObject.h.

◆ operator<<() [1/2]

std::ostream & XML::operator<< ( std::ostream & os,
const XMLObject & obj )

Definition at line 216 of file XMLObject.cpp.

◆ operator<<() [2/2]

std::ostream & XML::operator<< ( std::ostream & os,
const XMLObject * obj )

Definition at line 211 of file XMLObject.cpp.

◆ transcode()

std::string XML::transcode ( const XMLCh * xmlChStr)

Definition at line 37 of file XMLObject.cpp.