Virgil Security C++ SDK
Public Member Functions | Static Public Member Functions | List of all members
virgil::sdk::serialization::CanonicalSerializer< T > Class Template Reference

This class is responsible for serializing and deserializing models in Canonical Form. More...

#include <CanonicalSerializer.h>

Public Member Functions

 CanonicalSerializer ()=delete
 Forbid instantiation.
 

Static Public Member Functions

template<int INDENT = -1>
static VirgilByteArray toCanonicalForm (const T &model)
 Serizalizes model to Canonical Form. More...
 
template<int FAKE = 0>
static T fromCanonicalForm (const VirgilByteArray &data)
 Constructs object from its Canonical Form representation. More...
 

Detailed Description

template<typename T>
class virgil::sdk::serialization::CanonicalSerializer< T >

This class is responsible for serializing and deserializing models in Canonical Form.

Template Parameters
Tconcrete subclass
Note
Supported classes: CreateCardSnapshotModel, RevokeCardSnapshotModel

Member Function Documentation

template<typename T >
template<int FAKE = 0>
static T virgil::sdk::serialization::CanonicalSerializer< T >::fromCanonicalForm ( const VirgilByteArray &  data)
static

Constructs object from its Canonical Form representation.

Template Parameters
FAKEfake argument to allow template implementation in source file.
Parameters
dataCanonical representation of object
Returns
Constructed object
template<typename T >
template<int INDENT = -1>
static VirgilByteArray virgil::sdk::serialization::CanonicalSerializer< T >::toCanonicalForm ( const T &  model)
static

Serizalizes model to Canonical Form.

Template Parameters
INDENTif > 0 - pretty print, 0 - only new lines, -1 - compact
Parameters
modelmodel to serialize
Returns
serialized representation of model

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