• 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

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP Core
  • TranslatorBase
  • 4.11.3

TranslatorBase Class

(ServerIO::Translator::TranslatorBase)

Translator abstract class. Derived classes have to implement Translate() for ostream (for compose) and/or for istream (for parse). Derived classes can override MimeType() to inform translator users (IOServers) about MIME type that the class is generating or parsing. More...

Header: #include <IO/ServerIO/Translator/TranslatorBase.h>
Inherits: CDP::StudioAPI::CDPNode
  • List of all members, including inherited members

Public Functions

virtual void Configure(XMLElementEx *element, CDP::StudioAPI::ICDPNode *parent)
virtual std::string MimeType() const
virtual void Translate(STREAMTYPE &stream, const TranslatorChannelGroup &channelTree) const = 0

Reimplemented Public Functions

virtual const std::string GetNodeName() const override
  • 26 public functions inherited from CDP::StudioAPI::CDPNode
  • 22 public functions inherited from CDP::StudioAPI::ICDPNode

Static Public Members

std::string UnEscapeCppLiterals(const std::string &str)

Reimplemented Protected Functions

virtual void FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const override
  • 1 protected function inherited from CDP::StudioAPI::CDPNode

Detailed Description

Translator abstract class. Derived classes have to implement Translate() for ostream (for compose) and/or for istream (for parse). Derived classes can override MimeType() to inform translator users (IOServers) about MIME type that the class is generating or parsing.

Caution! These implementations must be thread-safe -- fe. not to acces property (that can be modified in component thread) values directly.

See also ServerIO::Translator::TranslatorChannelGroup and ServerIO::Translator::ValueMapper.

Member Function Documentation

[virtual] void TranslatorBase::Configure(XMLElementEx *element, CDP::StudioAPI::ICDPNode *parent)

[override virtual protected] void TranslatorBase::FillNodeChildren(CDP::StudioAPI::NodeStream &stream) const

[override virtual] const std::string TranslatorBase::GetNodeName() const

Reimplemented from ICDPNode::GetNodeName().

Returns node name. Returns property directly as this member function is not to be used in IOServer Main() thread.

[virtual] std::string TranslatorBase::MimeType() const

[pure virtual] void TranslatorBase::Translate(STREAMTYPE &stream, const TranslatorChannelGroup &channelTree) const

[static] std::string TranslatorBase::UnEscapeCppLiterals(const std::string &str)

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

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top