• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP Core
  • ValueMapper
  • 5.0.0

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 <ValueMapper>
  • List of all members, including inherited members

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)

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top