knowL: Knowledge Libraries
Loading...
Searching...
No Matches
knowCore::DeserialisationContexts Class Reference

#include <MetaType.h>

Classes

struct  Private
 

Public Member Functions

 DeserialisationContexts (const DeserialisationContexts &_rhs)
 
DeserialisationContextsoperator= (const DeserialisationContexts &_rhs)
 
cres_qresult< AbstractDeserialisationContext * > getContext (const knowCore::Uri &_uri) const
 
template<typename _T_ >
cres_qresult< _T_ * > getContext (const knowCore::Uri &_uri) const
 
void addContext (const knowCore::Uri &_uri, AbstractDeserialisationContext *_context)
 

Detailed Description

Store AbstractDeserialisationContext 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 DeserialisationContexts::addContext ( const knowCore::Uri & _uri,
AbstractDeserialisationContext * _context )

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

◆ getContext() [1/2]

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

◆ getContext() [2/2]

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

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