bpmn++
A BPMN parser library, written in C++
Loading...
Searching...
No Matches
BPMN::BaseElement Class Reference

Base class for all core BPMN elements. More...

Detailed Description

The class allows to access the underlying XML element and may have associated extension elements.

Definition at line 15 of file BaseElement.h.

#include <BaseElement.h>

Inheritance diagram for BPMN::BaseElement:

Public Member Functions

 BaseElement (XML::bpmn::tBaseElement *element)
 Constructs a BaseElement object representing a BPMN element.
 
template<typename T >
T * is ()
 Attempts to return the element in the specified type T.
 
template<typename T >
const T * is () const
 Attempts to return the element in the specified type T.
 
template<typename T = XML::bpmn::tBaseElement>
T * get ()
 Casts the element to the specified type T.
 
template<typename T = XML::bpmn::tBaseElement>
const T * get () const
 Casts the element to the specified type T.
 
- Public Member Functions inherited from BPMN::Element
virtual ~Element ()=default
 
template<typename T >
T * represents ()
 Attempts to cast the element to the specified type T.
 
template<typename T >
const T * represents () const
 Attempts to cast the element to the specified type T.
 
template<typename T >
T * as ()
 Casts the element to the specified type T.
 
template<typename T >
const T * as () const
 Casts the element to the specified type T.
 

Public Attributes

XML::bpmn::tBaseElementelement
 
std::string id
 Id of element.
 
std::unique_ptr< ExtensionElementsextensionElements
 

Constructor & Destructor Documentation

◆ BaseElement()

BaseElement::BaseElement ( XML::bpmn::tBaseElement element)

Definition at line 6 of file BaseElement.cpp.

Member Function Documentation

◆ get() [1/2]

template<typename T = XML::bpmn::tBaseElement>
T * BPMN::BaseElement::get ( )
inline
Returns
A pointer to casted object
Exceptions
std::runtime_errorif the cast fails

Definition at line 47 of file BaseElement.h.

◆ get() [2/2]

template<typename T = XML::bpmn::tBaseElement>
const T * BPMN::BaseElement::get ( ) const
inline
Returns
A pointer to casted object
Exceptions
std::runtime_errorif the cast fails

Definition at line 60 of file BaseElement.h.

◆ is() [1/2]

template<typename T >
T * BPMN::BaseElement::is ( )
inline
Returns
A pointer to casted object or nullptr if the cast fails

Definition at line 30 of file BaseElement.h.

◆ is() [2/2]

template<typename T >
const T * BPMN::BaseElement::is ( ) const
inline
Returns
A pointer to casted object or nullptr if the cast fails

Definition at line 38 of file BaseElement.h.

Member Data Documentation

◆ element

XML::bpmn::tBaseElement* BPMN::BaseElement::element

Definition at line 20 of file BaseElement.h.

◆ extensionElements

std::unique_ptr<ExtensionElements> BPMN::BaseElement::extensionElements

Definition at line 24 of file BaseElement.h.

◆ id

std::string BPMN::BaseElement::id

Definition at line 23 of file BaseElement.h.


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