ValueMapper Class
(ServerIO::Translator::ValueMapper)ValueMapper class instance is used for thread-safe and fast valuemap access in Translators. Uses templated class ValueMapperType<T> to actually implement maps and code for every CDP Channel type. ValueMapper will be created based on ValueMap vector reference using Update(vector<ValueMapBase*>) method. More...
Header: | #include <IO/ServerIO/Translator/ValueMapper.h> |
Public Functions
ValueMapper() | |
~ValueMapper() | |
void | AddToMap(T val, const std::string &streamVal) |
T | BackMappedValue(const std::string &streamVal) |
void | Clear() |
bool | HasBackMappedValue(const std::string &streamVal) |
bool | HasMappedValue(T val) |
std::string | MappedValue(T val) |
void | Update(std::vector<ValueMapBase *> &valueMapObjects) |
Detailed Description
ValueMapper class instance is used for thread-safe and fast valuemap access in Translators. Uses templated class ValueMapperType<T> to actually implement maps and code for every CDP Channel type. ValueMapper will be created based on ValueMap vector reference using Update(vector<ValueMapBase*>) method.
See also ServerIO::Translator::ValueMap.
Member Function Documentation
ValueMapper::ValueMapper()
Constructor for ValueMapper.
ValueMapper::~ValueMapper()
Destructor for ValueMapper. Explicitly mandatory because composing classes are unable to destruct unique_ptr<> d with default destructor.
void ValueMapper::AddToMap(T val, const std::string &streamVal)
T ValueMapper::BackMappedValue(const std::string &streamVal)
void ValueMapper::Clear()
Clears all existing valuemaps from mapper.
bool ValueMapper::HasBackMappedValue(const std::string &streamVal)
bool ValueMapper::HasMappedValue(T val)
Template function that hooks to corresponding type. Detects if value has mapping string.
std::string ValueMapper::MappedValue(T val)
Template function that hooks to corresponding type. Returns mapped string for value.
void ValueMapper::Update(std::vector<ValueMapBase *> &valueMapObjects)
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.