Derecho  0.9
Distributed systems toolkit for RDMA
Public Member Functions | Public Attributes | List of all members
mutils::DeserializationManager Struct Reference

The manager for any RemoteDeserializationContexts. More...

#include <SerializationSupport.hpp>

Collaboration diagram for mutils::DeserializationManager:
Collaboration graph
[legend]

Public Member Functions

 DeserializationManager (RemoteDeserialization_v rv)
 
 DeserializationManager (const DeserializationManager &)=delete
 
 DeserializationManager (DeserializationManager &&o)
 
DeserializationManagerregister_ctx (RemoteDeserializationContext_p ctx)
 
template<typename T >
T & mgr ()
 Lookup the context registered at this DeserializationManager whose type is T. More...
 
template<typename T >
const T & mgr () const
 As the above, but const. More...
 
template<typename T >
bool registered () const
 checks to see if a context of type T has been registered with this DeserializationManager. More...
 

Public Attributes

RemoteDeserialization_v registered_v
 Various registered managers. More...
 

Detailed Description

The manager for any RemoteDeserializationContexts.

Don't subclass this; rather construct it with any context managers you need as arguments to it. /be sure to have a pointer to this on hand whenever you need to deserialize something. If you're dead certain you never need a deserialization context, then you can not use this at all and just pass null to from_bytes* in place of this.

Definition at line 132 of file SerializationSupport.hpp.

Constructor & Destructor Documentation

◆ DeserializationManager() [1/3]

mutils::DeserializationManager::DeserializationManager ( RemoteDeserialization_v  rv)
inline

Definition at line 141 of file SerializationSupport.hpp.

◆ DeserializationManager() [2/3]

mutils::DeserializationManager::DeserializationManager ( const DeserializationManager )
delete

◆ DeserializationManager() [3/3]

mutils::DeserializationManager::DeserializationManager ( DeserializationManager &&  o)
inline

Definition at line 145 of file SerializationSupport.hpp.

Member Function Documentation

◆ mgr() [1/2]

template<typename T >
T& mutils::DeserializationManager::mgr ( )
inline

Lookup the context registered at this DeserializationManager whose type is T.

Note this means we assume that types uniquely identify contexts.

Definition at line 159 of file SerializationSupport.hpp.

◆ mgr() [2/2]

template<typename T >
const T& mutils::DeserializationManager::mgr ( ) const
inline

As the above, but const.

Definition at line 173 of file SerializationSupport.hpp.

◆ register_ctx()

DeserializationManager& mutils::DeserializationManager::register_ctx ( RemoteDeserializationContext_p  ctx)
inline

Definition at line 148 of file SerializationSupport.hpp.

◆ registered()

template<typename T >
bool mutils::DeserializationManager::registered ( ) const
inline

checks to see if a context of type T has been registered with this DeserializationManager.

Definition at line 188 of file SerializationSupport.hpp.

Member Data Documentation

◆ registered_v

RemoteDeserialization_v mutils::DeserializationManager::registered_v

Various registered managers.

Please note that this class does not own these pointers; you need to keep them managed somewhere else. Also ensure lifetime of this class is shorter than or the same as those registered contexts.

Definition at line 140 of file SerializationSupport.hpp.


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