anatomist 6.0.4
3D neuroimaging data viewer
anatomist::Unserializer Class Reference

Pointer decoder (or id to pointer map) More...

#include <anatomist/processor/unserializer.h>

Public Member Functions

 Unserializer ()
 
virtual ~Unserializer ()
 
void registerPointer (void *ptr, int id, const std::string &type="")
 
void * pointer (int id) const
 
void * pointer (int id, const std::string &typecheck) const
 
std::string type (void *ptr) const
 
const std::map< int, void * > & ids () const
 
void unregister (int id)
 
void garbageCollect ()
 
int id (void *ptr, const std::string &type="") const
 retreives the ID of an object.
 
int makeID (void *ptr, const std::string &type="")
 ganaerates an ID for given pointer and registers it
 
int freeID () const
 provides a new free ID for future registration
 

Detailed Description

Pointer decoder (or id to pointer map)

Definition at line 47 of file unserializer.h.

Constructor & Destructor Documentation

◆ Unserializer()

anatomist::Unserializer::Unserializer ( )

◆ ~Unserializer()

virtual anatomist::Unserializer::~Unserializer ( )
virtual

Member Function Documentation

◆ freeID()

int anatomist::Unserializer::freeID ( ) const

provides a new free ID for future registration

◆ garbageCollect()

void anatomist::Unserializer::garbageCollect ( )

◆ id()

int anatomist::Unserializer::id ( void * ptr,
const std::string & type = "" ) const

retreives the ID of an object.

If type is omitted, it will not be checked. Warning: this function is rather slow

References type().

◆ ids()

const std::map< int, void * > & anatomist::Unserializer::ids ( ) const
inline

Definition at line 57 of file unserializer.h.

◆ makeID()

int anatomist::Unserializer::makeID ( void * ptr,
const std::string & type = "" )

ganaerates an ID for given pointer and registers it

References type().

◆ pointer() [1/2]

void * anatomist::Unserializer::pointer ( int id) const

◆ pointer() [2/2]

void * anatomist::Unserializer::pointer ( int id,
const std::string & typecheck ) const

◆ registerPointer()

void anatomist::Unserializer::registerPointer ( void * ptr,
int id,
const std::string & type = "" )

References type().

◆ type()

std::string anatomist::Unserializer::type ( void * ptr) const

Referenced by id(), makeID(), and registerPointer().

◆ unregister()

void anatomist::Unserializer::unregister ( int id)

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