summaryrefslogtreecommitdiff
path: root/src/core/model/Domain.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-25 15:50:52 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-25 15:50:52 +0100
commiteab6577b066319aab7ebaf514e6bb7aab9590624 (patch)
treeb93f21d4eb207b539e341aee6bba500b9aea8783 /src/core/model/Domain.hpp
parent37a002577e7f4949e0634dca7e828b5333d2ccc5 (diff)
removed cardinality type definition from Domain.hpp and made everything compatible with the Variant cardinality.
Diffstat (limited to 'src/core/model/Domain.hpp')
-rw-r--r--src/core/model/Domain.hpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/model/Domain.hpp b/src/core/model/Domain.hpp
index e40a9f3..ef228b1 100644
--- a/src/core/model/Domain.hpp
+++ b/src/core/model/Domain.hpp
@@ -618,20 +618,19 @@ public:
* cardinalities independent of context? Should we not have at least have the
* possibility to define it context-dependently?
*/
-typedef RangeSet<size_t> Cardinality;
/**
* This is the default cardinality.
*/
-static Cardinality createAny()
+static Variant::cardinalityType createAny()
{
- Cardinality any;
+ Variant::cardinalityType any;
any.merge(Range<size_t>::typeRangeFrom(0));
return std::move(any);
}
-static const Cardinality AnyCardinality = createAny();
+static const Variant AnyCardinality = createAny();
/**
* A StructuredClass specifies nodes in the StructureTree of a document that
@@ -710,7 +709,7 @@ class StructuredClass : public Descriptor {
friend Domain;
private:
- const Cardinality cardinality;
+ const Variant cardinality;
Owned<StructuredClass> superclass;
NodeVector<StructuredClass> subclasses;
bool transparent;
@@ -758,7 +757,7 @@ public:
*/
StructuredClass(Manager &mgr, std::string name = "",
Handle<Domain> domain = nullptr,
- const Cardinality &cardinality = AnyCardinality,
+ Variant cardinality = AnyCardinality,
Handle<StructType> attributesDescriptor = nullptr,
Handle<StructuredClass> superclass = nullptr,
bool transparent = false, bool root = false);
@@ -768,7 +767,7 @@ public:
*
* @return the Cardinality of this StructuredClass (as a RangeSet).
*/
- const Cardinality &getCardinality() const { return cardinality; }
+ const Variant &getCardinality() const { return cardinality; }
/**
* Returns the superclass of this StructuredClass. This is not the same as
@@ -1016,7 +1015,7 @@ public:
* @return the newly created StructuredClass.
*/
Rooted<StructuredClass> createStructuredClass(
- std::string name, const Cardinality &cardinality = AnyCardinality,
+ std::string name, Variant cardinality = AnyCardinality,
Handle<StructType> attributesDescriptor = nullptr,
Handle<StructuredClass> superclass = nullptr, bool transparent = false,
bool root = false);