From 9dcc1f05926e880b98932d4a1d4a3401ee96ae4d Mon Sep 17 00:00:00 2001
From: ilor <kailoran@gmail.com>
Date: Thu, 4 Nov 2010 11:06:58 +0100
Subject: [PATCH] TSet class

---
 libwccl/CMakeLists.txt  |  1 +
 libwccl/values/tset.cpp |  7 +++++++
 libwccl/values/tset.h   | 43 +++++++++++++++++++++++++++++++++++++++++
 libwccl/variables.h     |  4 +++-
 4 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 libwccl/values/tset.cpp
 create mode 100644 libwccl/values/tset.h

diff --git a/libwccl/CMakeLists.txt b/libwccl/CMakeLists.txt
index 05392c1..cdab23c 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 0000000..41aec52
--- /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 0000000..1618e0d
--- /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 5773541..902cf1e 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();
-- 
GitLab