anatomist  5.1.2
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. More...
 
int makeID (void *ptr, const std::string &type="")
 ganaerates an ID for given pointer and registers it More...
 
int freeID () const
 provides a new free ID for future registration More...
 

Detailed Description

Pointer decoder (or id to pointer map)

Definition at line 46 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

◆ ids()

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

Definition at line 56 of file unserializer.h.

◆ makeID()

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

ganaerates an ID for given pointer and registers it

◆ 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 = "" 
)

◆ type()

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

◆ unregister()

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

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