summaryrefslogtreecommitdiff
path: root/src/core/model/Domain.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model/Domain.hpp')
-rw-r--r--src/core/model/Domain.hpp43
1 files changed, 31 insertions, 12 deletions
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp
index d0227bd..d19558e 100644
--- a/src/core/model/Domain.hpp
+++ b/src/core/model/Domain.hpp
@@ -203,10 +203,7 @@ public:
// TODO: Is returning a NodeVector alright?
NodeVector<StructuredClass> &getChildren() { return children; }
- const NodeVector<StructuredClass> &getChildren() const
- {
- return children;
- }
+ const NodeVector<StructuredClass> &getChildren() const { return children; }
FieldType getFieldType() const { return fieldType; }
@@ -216,6 +213,12 @@ public:
};
/**
+ * A global variable for the ManagedType of a FieldDescriptor.
+ */
+static ManagedType FieldDescriptorType{"FieldDescriptor",
+ typeid(FieldDescriptor)};
+
+/**
* This is a super class for StructuredClasses and AnnotationClasses and is,
* in itself, not supposed to be instantiated. It defines that both, Annotations
* and StructuredEntities, may have attributes and fields. For more information
@@ -280,6 +283,11 @@ public:
}
};
+/**
+ * A global variable for the ManagedType of a Descriptor.
+ */
+static ManagedType DescriptorType{"Descriptor", typeid(Descriptor)};
+
typedef RangeSet<size_t> Cardinality;
/**
@@ -397,6 +405,12 @@ public:
};
/**
+ * A global variable for the ManagedType of a StructuredClass.
+ */
+static ManagedType StructuredClassType{
+ "StructuredClass", typeid(StructuredClass), {&DescriptorType}};
+
+/**
* An AnnotationClass defines allowed Annotations. For more information on
* Annotations please refer to the Document.hpp.
*
@@ -406,6 +420,12 @@ class AnnotationClass : public Descriptor {
};
/**
+ * A global variable for the ManagedType of an AnnotationClass.
+ */
+static ManagedType AnnotationClassType{
+ "AnnotationClass", typeid(AnnotationClass), {&DescriptorType}};
+
+/**
* A Domain node specifies which StructuredClasses are allowed at the root
* level (or which Nonterminals are axioms of the grammar) and which Annotations
* are allowed globally. TODO: Do we want to be able to restrict Annotations to
@@ -434,10 +454,7 @@ public:
}
// TODO: Is returning a NodeVector alright?
- NodeVector<StructuredClass> &getRootStructures()
- {
- return rootStructures;
- }
+ NodeVector<StructuredClass> &getRootStructures() { return rootStructures; }
const NodeVector<StructuredClass> &getRootStructures() const
{
@@ -456,11 +473,13 @@ public:
NodeVector<Typesystem> &getTypesystems() { return typesystems; }
- const NodeVector<Typesystem> &getTypesystems() const
- {
- return typesystems;
- }
+ const NodeVector<Typesystem> &getTypesystems() const { return typesystems; }
};
+
+/**
+ * A global variable for the ManagedType of a Domain.
+ */
+static ManagedType DomainType{"Domain", typeid(Domain)};
}
}