summaryrefslogtreecommitdiff
path: root/src/core/model/Domain.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-18 21:09:11 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-18 21:09:11 +0100
commit0c06b2798b50ce3f54795d80aa6032175382af54 (patch)
tree68a5eaad3eaf2fca51ae074428ba6a212a37d0d5 /src/core/model/Domain.hpp
parentc7cd098d4b79b9a11a6e9a0cdd05d0371ff5e032 (diff)
Made constructors of Typesystem, Document and Domain more consistent
Diffstat (limited to 'src/core/model/Domain.hpp')
-rw-r--r--src/core/model/Domain.hpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp
index 579a65c..dad726a 100644
--- a/src/core/model/Domain.hpp
+++ b/src/core/model/Domain.hpp
@@ -703,22 +703,36 @@ protected:
void addAnnotationClass(Handle<AnnotationClass> a);
public:
+
/**
* The constructor for a new domain. Note that this is an empty Domain and
* still has to be filled with StructuredClasses and AnnotationClasses.
*
* @param mgr is the Manager instance.
- * @param sys is the SystemTypesystem instance.
* @param name is a name for this domain which will be used for later
* references to this Domain.
*/
- Domain(Manager &mgr, Handle<SystemTypesystem> sys, std::string name)
- // TODO: Can a domain have a parent?
+ Domain(Manager &mgr, std::string name)
: Node(mgr, std::move(name), nullptr),
structuredClasses(this),
annotationClasses(this),
- typesystems(this, std::vector<Handle<Typesystem>>{sys})
+ typesystems(this)
+ {
+ }
+
+ /**
+ * The constructor for a new domain. Note that this is an empty Domain and
+ * still has to be filled with StructuredClasses and AnnotationClasses.
+ *
+ * @param mgr is the Manager instance.
+ * @param sys is the SystemTypesystem instance.
+ * @param name is a name for this domain which will be used for later
+ * references to this Domain.
+ */
+ Domain(Manager &mgr, Handle<SystemTypesystem> sys, std::string name)
+ : Domain(mgr, std::move(name))
{
+ includeTypesystem(sys);
}
/**
@@ -757,12 +771,12 @@ public:
/**
* Adds a Typesystem reference to this Domain.
*/
- void addTypesystem(Handle<Typesystem> t) { typesystems.push_back(t); }
+ void includeTypesystem(Handle<Typesystem> t) { typesystems.push_back(t); }
/**
* Adds multiple Typesystem references to this Domain.
*/
- void addTypesystems(const std::vector<Handle<Typesystem>> &ts)
+ void includeTypesystems(const std::vector<Handle<Typesystem>> &ts)
{
typesystems.insert(typesystems.end(), ts.begin(), ts.end());
}