diff --git a/libwccl/CMakeLists.txt b/libwccl/CMakeLists.txt index 05392c1df5906af204878102176e5a80dd4b5637..cdab23cc308c1ff0e0ff0235cd13571d23734fd1 100644 --- a/libwccl/CMakeLists.txt +++ b/libwccl/CMakeLists.txt @@ -18,6 +18,7 @@ SET(libwccl_STAT_SRC values/position.cpp values/positionref.cpp values/strset.cpp + values/tset.cpp values/value.cpp variables.cpp ) diff --git a/libwccl/values/tset.cpp b/libwccl/values/tset.cpp new file mode 100644 index 0000000000000000000000000000000000000000..41aec52051d8ec65c0643b3fde68974d08143dad --- /dev/null +++ b/libwccl/values/tset.cpp @@ -0,0 +1,7 @@ +#include <libwccl/values/tset.h> + +namespace Wccl { + +const char* TSet::type_name = "TSet"; + +} /* end ns Wccl */ diff --git a/libwccl/values/tset.h b/libwccl/values/tset.h new file mode 100644 index 0000000000000000000000000000000000000000..1618e0dc4e40491ef47da0bcea45e0a56ada56bc --- /dev/null +++ b/libwccl/values/tset.h @@ -0,0 +1,43 @@ +#ifndef LIBWCCL_VALUES_TSET_H +#define LIBWCCL_VALUES_TSET_H + +#include <libwccl/values/value.h> +#include <libcorpus2/tag.h> + +namespace Wccl { + +class TSet : public Value +{ +public: + WCCL_VALUE_PREAMBLE; + + TSet() + : tag_() + { + } + + explicit TSet(Corpus2::Tag tag) + : tag_(tag) + { + } + + const Corpus2::Tag& get_tag() const { + return tag_; + } + + void set_tag(const Corpus2::Tag& tag) { + tag_ = tag; + } + + Corpus2::Tag& tag_ref() { + return tag_; + } + +private: + Corpus2::Tag tag_; +}; + + +} /* end ns Wccl */ + +#endif // LIBWCCL_VALUES_TSET_H diff --git a/libwccl/variables.h b/libwccl/variables.h index 5773541ab44fee29c19f842665795e3e643c3c36..902cf1e10f0dedcdbb61da7b850b8eba8afd7d9e 100644 --- a/libwccl/variables.h +++ b/libwccl/variables.h @@ -6,6 +6,7 @@ #include <libwccl/values/position.h> #include <libwccl/values/positionref.h> #include <libwccl/values/strset.h> +#include <libwccl/values/tset.h> #include <iostream> #include <map> #include <string> @@ -86,12 +87,13 @@ class Variables : detail::Vmap<Value> , detail::Vmap<Position> , detail::Vmap<PositionRef> , detail::Vmap<StrSet> + , detail::Vmap<TSet> { public: /// Valid value types, should match the inheritance. /// the type Value must be first, order of other items is not important typedef boost::mpl::list<Value, - Bool, Position, PositionRef, StrSet> types; + Bool, Position, PositionRef, StrSet, TSet> types; /// Constructor, creates an empty instance. Variables();