29 #ifndef Pt_Serializer_h
30 #define Pt_Serializer_h
33 #include <Pt/Formatter.h>
34 #include <Pt/Decomposer.h>
35 #include <Pt/SerializationContext.h>
86 void begin(
const T& type,
const char* name)
94 dec->
begin(type, name);
95 _stack.push_back(dec);
100 dec->~BasicDecomposer<T>();
126 void* allocate(std::size_t n);
129 void deallocate(
void* p);
134 std::vector<Decomposer*> _stack;
Core module.
Definition: Allocator.h:33
Manages the decomposition of types during serialization.
Definition: Decomposer.h:44
Manages the decomposition of types during serialization.
Definition: Decomposer.h:108
Serializes a set of types.
Definition: Serializer.h:46
void begin(const T &type, const char *name)
Begin decomposing a type.
Definition: Decomposer.h:123
virtual ~Serializer()
Destructor.
Context for the serialization of types.
Definition: Api-SerializationContext.h:22
bool advance()
Advances formatting of the object set.
Formatter * formatter()
Returns the used formatter.
void setFormatter(Formatter &formatter)
Returns formatter to use.
void finish()
Finishes parsing of the object set.
void clear()
Clears all content.
Serializer()
Default constructor.
void begin(const T &type, const char *name)
Begins serialization of an object.
Definition: Serializer.h:86
void reset(SerializationContext *context)
Clears the serializer and sets a new context.
SerializationContext * context()
Returns the used context.