From 0ed53efd407fb4e5462c3c1f606be90bb3f7241b Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Fri, 30 Jan 2015 18:18:02 +0100 Subject: Added "Cardinality" type and AnyCardinality constant to RangeSet --- src/core/RangeSet.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/core/RangeSet.cpp (limited to 'src/core/RangeSet.cpp') diff --git a/src/core/RangeSet.cpp b/src/core/RangeSet.cpp new file mode 100644 index 0000000..c07dc9b --- /dev/null +++ b/src/core/RangeSet.cpp @@ -0,0 +1,32 @@ +/* + Ousía + Copyright (C) 2014 Benjamin Paaßen, Andreas Stöckel + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "RangeSet.hpp" + +namespace ousia { + +static Cardinality createAny() +{ + Cardinality any; + any.merge(Range::typeRangeFrom(0)); + return std::move(any); +} + +const Cardinality AnyCardinality = createAny(); +} + -- cgit v1.2.3