![]() |
anatomist
4.7.0
3D neuroimaging data viewer
|
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... | |
Pointer decoder (or id to pointer map)
Definition at line 46 of file unserializer.h.
anatomist::Unserializer::Unserializer | ( | ) |
|
virtual |
int anatomist::Unserializer::freeID | ( | ) | const |
provides a new free ID for future registration
Referenced by ids().
void anatomist::Unserializer::garbageCollect | ( | ) |
Referenced by ids().
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
Referenced by ids().
|
inline |
Definition at line 56 of file unserializer.h.
References freeID(), garbageCollect(), id(), makeID(), and unregister().
int anatomist::Unserializer::makeID | ( | void * | ptr, |
const std::string & | type = "" |
||
) |
ganaerates an ID for given pointer and registers it
Referenced by ids().
void* anatomist::Unserializer::pointer | ( | int | id | ) | const |
void* anatomist::Unserializer::pointer | ( | int | id, |
const std::string & | typecheck | ||
) | const |
void anatomist::Unserializer::registerPointer | ( | void * | ptr, |
int | id, | ||
const std::string & | type = "" |
||
) |
std::string anatomist::Unserializer::type | ( | void * | ptr | ) | const |
void anatomist::Unserializer::unregister | ( | int | id | ) |
Referenced by ids().