![]() |
anatomist
5.1.2
3D neuroimaging data viewer
|
Serializer is a helper class for pointer serialization. More...
#include <anatomist/processor/Serializer.h>
Public Member Functions | |
Constructors and Destructor | |
Serializer () | |
does nothing More... | |
virtual | ~Serializer () |
does nothing More... | |
Serialization | |
int | serialize (void *ptr) |
Generate a unique ID to serialize a pointer. More... | |
Disable copy | |
std::map< void *, int > | _ptr2id |
Pointer to ID lookup table. More... | |
int | _id |
Current ID: begin from 0 and increment with every new pointer. More... | |
Serializer is a helper class for pointer serialization.
Every pointer can be asociated with a unique integer ID that can be saved to a file and restored later.
Definition at line 54 of file Serializer.h.
|
inline |
does nothing
Definition at line 104 of file Serializer.h.
|
virtual |
does nothing
int anatomist::Serializer::serialize | ( | void * | ptr | ) |
Generate a unique ID to serialize a pointer.
ptr | pointer to serialize |
|
protected |
Current ID: begin from 0 and increment with every new pointer.
Definition at line 97 of file Serializer.h.
|
protected |
Pointer to ID lookup table.
Definition at line 94 of file Serializer.h.