Skip to content
Snippets Groups Projects
Commit b847cf0b authored by Adam Wardynski's avatar Adam Wardynski
Browse files

Common set_value, get_value interface for Values

parent 9ad17870
Branches
No related merge requests found
......@@ -36,6 +36,14 @@ public:
set_ = set;
}
const set_t& get_value() const {
return contents();
}
void set_value(const set_t& set) {
set_contents(set);
}
void swap(StrSet& ss) {
ss.set_.swap(set_);
}
......
......@@ -21,11 +21,11 @@ public:
{
}
const Corpus2::Tag& get_tag() const {
const Corpus2::Tag& get_value() const {
return tag_;
}
void set_tag(const Corpus2::Tag& tag) {
void set_value(const Corpus2::Tag& tag) {
tag_ = tag;
}
......
......@@ -21,7 +21,7 @@ BOOST_AUTO_TEST_CASE(boolz)
BOOST_AUTO_TEST_CASE(tsetz)
{
TSet t;
BOOST_CHECK(t.get_tag().is_null());
BOOST_CHECK(t.get_value().is_null());
Value& v = t;
BOOST_CHECK_EQUAL(v.get_type_name(), TSet::type_name);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment