| helics 3.6.1

Public Types | Static Public Member Functions | List of all members
helics::ValueConverter< X > Class Template Reference

`#include <ValueConverter.hpp>`

## Public Types
using | baseType = X

## Static Public Member Functions
static SmallBuffer | convert (const X &val)
static void | convert (const X &val, SmallBuffer &store)
static void | convert (const X *vals, size_t size, SmallBuffer &store)
static SmallBuffer | convert (const X *vals, size_t size)
static X | interpret (const data_view &block)
static void | interpret (const data_view &block, X &val)
static std::string | type ()

## Detailed Description

### template<class X>
class helics::ValueConverter< X >

converter for a basic value

## Member Function Documentation

## ◆ convert() [1/4]

template<class X >

static SmallBuffer helics::ValueConverter< X >::convert | ( | const X & | val | ) |
| inline static

convert the value to a block of data

Referenced by helics::ValueConverter< std::vector< std::string > >::convert(), and helics::ValueConverter< X >::convert().

## ◆ convert() [2/4]

template<class X >

static void helics::ValueConverter< X >::convert | ( | const X & | val,
|  | SmallBuffer & | store
| ) |  |
| inline static

convert the value and store to a specific block of data

## ◆ convert() [3/4]

template<class X >

static SmallBuffer helics::ValueConverter< X >::convert | ( | const X * | vals,
|  | size_t | size
| ) |  |
| inline static

convert a raw vector of objects and store to a specific block

References helics::ValueConverter< X >::convert().

## ◆ convert() [4/4]

template<class X >

static void helics::ValueConverter< X >::convert | ( | const X * | vals,
|  | size_t | size,
|  | SmallBuffer & | store
| ) |  |
| inline static

convert a raw vector of objects and store to a specific block

## ◆ interpret() [1/2]

template<class X >

static X helics::ValueConverter< X >::interpret | ( | const data_view & | block | ) |
| inline static

interpret a view of the data and convert back to a val

References helics::data_view::bytes().

Referenced by helics::doubleExtractAndConvert(), and helics::ValueConverter< std::vector< std::string > >::interpret().

## ◆ interpret() [2/2]

template<class X >

static void helics::ValueConverter< X >::interpret | ( | const data_view & | block,
|  | X & | val
| ) |  |
| inline static

interpret a view of the data block and store to the specified value

References helics::data_view::bytes().

## ◆ type()

template<class X >

static std::string helics::ValueConverter< X >::type | ( |  | ) |
| inline static

get the type of the value

The documentation for this class was generated from the following file:

- ValueConverter.hpp