core::CacheCodec< T > Struct Template Reference

`#include <core/cache_codec.h>`

## Static Public Member Functions

static std::string | encode (T const &value)
| Converts a value of custom type T into a string.
static T | decode (std::string const &s)
| Converts a string into a value of custom type T.

## Detailed Description

template<typename T>
struct core::CacheCodec< T >

Traits for serialization and deserialization of cache custom types. To use custom types, specialize this template for each custom type (other than string) in the core namespace.

Warning
  Do not specialize this struct for std::string! Doing so has no effect.

See also
  PersistentCache

## Member Function Documentation

## decode()

template<typename T>

T core::CacheCodec< T >::decode | ( | std::string const & | s | ) |

static

Converts a string into a value of custom type T.

## encode()

template<typename T>

std::string core::CacheCodec< T >::encode | ( | T const & | value | ) |

static

Converts a value of custom type T into a string.

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

- cache_codec.h