4#include <collections.h>
11 collections_set<std::string> _tags;
13 void merge_foreach(
const char* value) {
add(value); }
15 FunctionPointer<void(
const char*)> _merge_foreach =
16 function_pointer(
this, &SpecTagCollection::merge_foreach);
19 void add(
const char* value)
override { _tags.emplace(value); }
20 bool has(
const char* key)
const override {
21 auto found = _tags.find(key);
22 return found != _tags.end();
25 for (
auto& tag : _tags) fn->invoke(tag.c_str());
28 void clear()
override { _tags.clear(); }
void merge(ISpecTagCollection *other) override
void foreach_tag(ForEachTagFn *fn) const override
void add(const char *value) override
bool has(const char *key) const override
virtual void foreach_tag(ForEachTagFn *) const =0
IFunctionPointer< void(const char *)> ForEachTagFn