kDB: Knowledge DataBase
Loading...
Searching...
No Matches
knowCore::SerialisationContexts Class Reference

#include <MetaType.h>

Classes

struct  Private
 

Public Member Functions

 SerialisationContexts (const SerialisationContexts &_rhs)
 
SerialisationContextsoperator= (const SerialisationContexts &_rhs)
 
cres_qresult< AbstractSerialisationContext * > getContext (const knowCore::Uri &_uri) const
 
template<typename _T_ >
cres_qresult< _T_ * > getContext (const knowCore::Uri &_uri) const
 
void addContext (const knowCore::Uri &_uri, AbstractSerialisationContext *_context)
 

Detailed Description

Store AbstractSerialisationContext that are used by the meta-type system during deserialisation of objects. This is mostly useful for deserialising objects whose implementation vary depending on context.

This class use shared data, and cannot be cloned.

Member Function Documentation

◆ addContext()

void SerialisationContexts::addContext ( const knowCore::Uri & _uri,
AbstractSerialisationContext * _context )

Add a context to the set of contexts. The ownership of _context is transfered to this SerialisationContexts.

◆ getContext() [1/2]

cres_qresult< AbstractSerialisationContext * > SerialisationContexts::getContext ( const knowCore::Uri & _uri) const
Returns
the context referenced by _uri.

◆ getContext() [2/2]

template<typename _T_ >
cres_qresult< _T_ * > knowCore::SerialisationContexts::getContext ( const knowCore::Uri & _uri) const
Returns
the context referenced by _uri.

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