bpmn++
A BPMN parser library, written in C++
tRelationship.h
Go to the documentation of this file.
1 #ifndef XML_bpmn_tRelationship_H
2 #define XML_bpmn_tRelationship_H
3 #include <memory>
4 #include <optional>
5 #include <vector>
6 
7 #include "../XMLObject.h"
8 #include "tBaseElement.h"
10 
11 /**
12  * @brief The `XML::bpmn` namespace contains classes from the following XML-schema(s): @ref xsd/DC.xsd, @ref xsd/DI.xsd, @ref xsd/BPMNDI.xsd, @ref xsd/Semantic.xsd, @ref xsd/BPMN20.xsd.
13  */
14 namespace XML::bpmn {
15 
17 
18 /**
19  * Overview:
20  * - Element name: tRelationship
21  * - XML-Schema: xsd/Semantic.xsd
22  * - XML-Namespace: http://www.omg.org/spec/BPMN/20100524/MODEL
23  *
24  * Members:
25  * - source : QName [1..*]
26  * - target : QName [1..*]
27  * - type : string [1..1]
28  * - direction : tRelationshipDirection [0..1]
29  * - documentation : tDocumentation [0..*] (from: tBaseElement)
30  * - extensionElements : tExtensionElements [0..1] (from: tBaseElement)
31  * - id : ID [0..1] (from: tBaseElement)
32  *
33  * Automatically generated by schematic++ v0.4.0 (https://github.com/rajgoel/schematicpp)
34  */
35 class tRelationship : public tBaseElement {
36  template<typename T> friend XMLObject* ::XML::createInstance(const Namespace& xmlns, const ClassName& className, const xercesc::DOMElement* element);
37 private:
38  static bool registerClass() {
39  XMLObject::factory["http://www.omg.org/spec/BPMN/20100524/MODEL:tRelationship"] = &createInstance<tRelationship>; // register function in factory
40  return true;
41  };
42  inline static bool registered = registerClass();
43 protected:
44  tRelationship(const Namespace& xmlns, const ClassName& className, const xercesc::DOMElement* element, const Attributes& defaultAttributes);
45 
46  friend class tDefinitions;
47 
48 public:
49  /// default attributes to be used if they are not explicitly provided
50  inline static const Attributes defaults = {
51  };
52 
53  std::vector< std::reference_wrapper<XMLObject> > source;
54  std::vector< std::reference_wrapper<XMLObject> > target;
55  Attribute& type; ///< Attribute value can be expected to be of type 'std::string'
56  std::optional< std::reference_wrapper<Attribute> > direction; ///< Attribute value can be expected to be of type 'std::string'
57 };
58 
59 } // namespace XML::bpmn
60 
61 #endif // XML_bpmn_tRelationship_H
A class representing a node in an XML-tree.
Definition: XMLObject.h:115
const ClassName className
Definition: XMLObject.h:243
static Factory factory
Definition: XMLObject.h:155
Namespace xmlns
Definition: XMLObject.h:242
std::vector< std::reference_wrapper< XMLObject > > source
Definition: tRelationship.h:53
tRelationship(const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element, const Attributes &defaultAttributes)
Attribute & type
Attribute value can be expected to be of type 'std::string'.
Definition: tRelationship.h:55
static const Attributes defaults
default attributes to be used if they are not explicitly provided
Definition: tRelationship.h:50
std::optional< std::reference_wrapper< Attribute > > direction
Attribute value can be expected to be of type 'std::string'.
Definition: tRelationship.h:56
std::vector< std::reference_wrapper< XMLObject > > target
Definition: tRelationship.h:54
The XML::bpmn namespace contains classes from the following XML-schema(s): xsd/DC....
std::string Namespace
Definition: XMLObject.h:24
std::vector< Attribute > Attributes
Definition: XMLObject.h:80
std::string ClassName
Definition: XMLObject.h:19
XMLObject * createInstance(const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element)
Template function used to store in factory.
Definition: XMLObject.h:84
A struct representing an attribute of an XML-node.
Definition: XMLObject.h:73
std::string tRelationshipDirection