BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
tAttribute.h
Go to the documentation of this file.
1#ifndef XML_bpmnos_tAttribute_H
2#define XML_bpmnos_tAttribute_H
3#include <memory>
4#include <optional>
5#include <vector>
6
7#include "../XMLObject.h"
8#include "tAttributeType.h"
9#include "tObjectiveType.h"
10
11/**
12 * @brief The `XML::bpmnos` namespace contains classes from the following XML-schema(s): @ref xsd/BPMNOS.xsd.
13 */
14namespace XML::bpmnos {
15
16class tAttributeType;
17class tObjectiveType;
18
19/**
20 * Overview:
21 * - Element name: tAttribute
22 * - XML-Schema: xsd/BPMNOS.xsd
23 * - XML-Namespace: https://bpmnos.telematique.eu
24 *
25 * Members:
26 * - id : ID [1..1]
27 * - name : string [1..1]
28 * - type : tAttributeType [1..1]
29 * - objective : tObjectiveType [0..1]
30 * - weight : decimal [0..1]
31 *
32 * Automatically generated by schematic++ v0.4.0 (https://github.com/rajgoel/schematicpp)
33 */
34class tAttribute : public XMLObject {
35 template<typename T> friend XMLObject* ::XML::createInstance(const Namespace& xmlns, const ClassName& className, const xercesc::DOMElement* element);
36private:
37 static bool registerClass() {
38 XMLObject::factory["https://bpmnos.telematique.eu:tAttribute"] = &createInstance<tAttribute>; // register function in factory
39 return true;
40 };
41 inline static bool registered = registerClass();
42protected:
43 tAttribute(const Namespace& xmlns, const ClassName& className, const xercesc::DOMElement* element, const Attributes& defaultAttributes);
44
45 friend class tAttributes;
46
47public:
48 /// default attributes to be used if they are not explicitly provided
49 inline static const Attributes defaults = {
50 };
51
52 Attribute& id; ///< Attribute value can be expected to be of type 'std::string'
53 Attribute& name; ///< Attribute value can be expected to be of type 'std::string'
54 Attribute& type; ///< Attribute value can be expected to be of type 'std::string'
55 std::optional< std::reference_wrapper<Attribute> > objective; ///< Attribute value can be expected to be of type 'std::string'
56 std::optional< std::reference_wrapper<Attribute> > weight; ///< Attribute value can be expected to be of type 'double'
57};
58
59} // namespace XML::bpmnos
60
61#endif // XML_bpmnos_tAttribute_H
A class representing a node in an XML-tree.
Definition XMLObject.h:115
const ClassName className
Definition bpmn++.h:244
static Factory factory
Definition bpmn++.h:156
Namespace xmlns
Definition bpmn++.h:243
Attribute & name
Attribute value can be expected to be of type 'std::string'.
Definition tAttribute.h:53
friend XMLObject * XML::createInstance(const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element)
Attribute & type
Attribute value can be expected to be of type 'std::string'.
Definition tAttribute.h:54
std::optional< std::reference_wrapper< Attribute > > weight
Attribute value can be expected to be of type 'double'.
Definition tAttribute.h:56
tAttribute(const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element, const Attributes &defaultAttributes)
Definition tAttribute.cpp:6
static const Attributes defaults
default attributes to be used if they are not explicitly provided
Definition tAttribute.h:49
Attribute & id
Attribute value can be expected to be of type 'std::string'.
Definition tAttribute.h:52
std::optional< std::reference_wrapper< Attribute > > objective
Attribute value can be expected to be of type 'std::string'.
Definition tAttribute.h:55
The XML::bpmnos namespace contains classes from the following XML-schema(s): xsd/BPMNOS....
Definition attribute.h:13
std::string Namespace
Definition bpmn++.h:25
std::string ClassName
Definition bpmn++.h:22
XMLObject * createInstance(const Namespace &xmlns, const ClassName &className, const xercesc::DOMElement *element)
Template function used to store in factory.
Definition bpmn++.h:85
std::vector< Attribute > Attributes
Definition bpmn++.h:81
A struct representing an attribute of an XML-node.
Definition XMLObject.h:73
std::string tAttributeType
std::string tObjectiveType