From 06efbbafaac6da7d8beba7a37234b3a848b8a8fa Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 8 Apr 2015 19:33:41 +0200 Subject: added getter for referenced typesystems and ontologies. --- src/core/model/Ontology.hpp | 9 ++++++++- src/core/model/Typesystem.hpp | 12 +++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src/core/model') diff --git a/src/core/model/Ontology.hpp b/src/core/model/Ontology.hpp index cb314cc..3ef3b65 100644 --- a/src/core/model/Ontology.hpp +++ b/src/core/model/Ontology.hpp @@ -1445,6 +1445,13 @@ public: typesystems.insert(typesystems.end(), ts.begin(), ts.end()); } + /** + * Returns all referenced ontologies. + * + * @return all referenced ontologies. + */ + const NodeVector &getOntologies() const { return ontologies; } + /** * Adds a Ontology reference to this Ontology. */ @@ -1476,4 +1483,4 @@ extern const Rtti Ontology; } } -#endif /* _OUSIA_MODEL_ONTOLOGY_HPP_ */ +#endif /* _OUSIA_MODEL_ONTOLOGY_HPP_ */ \ No newline at end of file diff --git a/src/core/model/Typesystem.hpp b/src/core/model/Typesystem.hpp index 8079578..559a74c 100644 --- a/src/core/model/Typesystem.hpp +++ b/src/core/model/Typesystem.hpp @@ -1249,6 +1249,16 @@ public: */ Rooted createConstant(const std::string &name, Variant value); + /** + * Returns all referenced Typesystems. + * + * @return all referenced Typesystems. + */ + const NodeVector &getTypesystemReferences() const + { + return typesystems; + } + /** * Adds a reference to the given typesystem class. * @@ -1463,4 +1473,4 @@ extern const Rtti SystemTypesystem; } } -#endif /* _OUSIA_MODEL_TYPESYSTEM_HPP_ */ +#endif /* _OUSIA_MODEL_TYPESYSTEM_HPP_ */ \ No newline at end of file -- cgit v1.2.3