diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-30 18:18:02 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2015-01-30 18:18:02 +0100 |
commit | 0ed53efd407fb4e5462c3c1f606be90bb3f7241b (patch) | |
tree | efa7e55bdf1925fbf1ef5e2ad5155033d4d29713 /src/core/RangeSet.cpp | |
parent | 729ea17ed17cf81eb19847216406e40686df679d (diff) |
Added "Cardinality" type and AnyCardinality constant to RangeSet
Diffstat (limited to 'src/core/RangeSet.cpp')
-rw-r--r-- | src/core/RangeSet.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>. +*/ + +#include "RangeSet.hpp" + +namespace ousia { + +static Cardinality createAny() +{ + Cardinality any; + any.merge(Range<size_t>::typeRangeFrom(0)); + return std::move(any); +} + +const Cardinality AnyCardinality = createAny(); +} + |