#include <Pt/Composer.h>
Manages the composition of types during serialization.
Inherits Composer.
Public Member Functions | |
| BasicComposer (SerializationContext *context=0) | |
| Construct with context. | |
| void | begin (T &type) |
| Begin composing a type. | |
| Composer * | beginDictElement () |
| Begins composition of a dict key. More... | |
| Composer * | beginDictKey () |
| Begins composition of a dict key. | |
| Composer * | beginDictValue () |
| Begins composition of a dict value. | |
| Composer * | beginElement () |
| Begins composition of a sequence member. | |
| Composer * | beginMember (const std::string &name) |
| Begins composition of a struct member. | |
| Composer * | beginMember (const char *name, std::size_t len) |
| Begins composition of a struct member. | |
| Composer * | finish () |
| Finishes composition of a struct or sequence member. | |
| Composer * | parent () const |
| Returns the parent composer. | |
| void | setBinary (const char *data, std::size_t length) |
| Composes a binary value. | |
| void | setBool (bool value) |
| Composes a boolean value. | |
| void | setChar (const Pt::Char &ch) |
| Composes a char value. | |
| void | setFloat (long double value) |
| Composes a float value. | |
| void | setId (const std::string &id) |
| Sets the reference id of the type to compose. More... | |
| void | setId (const char *id, std::size_t len) |
| Sets the reference id of the type to compose. More... | |
| void | setInt (Pt::int64_t value) |
| Composes a signed integer type. More... | |
| void | setParent (Composer *parent) |
| Sets the parent composer. | |
| void | setReference (const std::string &id) |
| Composes a reference. | |
| void | setReference (const char *id, std::size_t len) |
| Composes a reference. | |
| void | setString (const Pt::String &value) |
| Composes a string value. | |
| void | setString (const Pt::Char *value, std::size_t len) |
| Composes a string value. | |
| void | setTypeName (const std::string &type) |
| Sets the type name of the type to compose. More... | |
| void | setTypeName (const char *type, std::size_t len) |
| Sets the type name of the type to compose. More... | |
| void | setUInt (Pt::int64_t value) |
| Composes an unsigned integer type. More... | |
Protected Member Functions | |
| Composer * | onBeginDictElement () |
| Begins composition of a dict key. | |
| Composer * | onBeginDictKey () |
| Begins composition of a dict key. | |
| Composer * | onBeginDictValue () |
| Begins composition of a dict value. | |
| Composer * | onBeginElement () |
| Begins composition of a sequence member. | |
| Composer * | onBeginMember (const char *name, std::size_t len) |
| Begin composition os a struct member. | |
| Composer * | onFinish () |
| Finishes composition of a struct or sequence member. | |
| void | onSetBinary (const char *data, std::size_t length) |
| Compose a binary value. | |
| void | onSetBool (bool value) |
| Compose a bool value. | |
| void | onSetChar (const Pt::Char &ch) |
| Compose a character value. | |
| void | onSetFloat (long double value) |
| Compose a floating point value. | |
| void | onSetId (const char *id, std::size_t len) |
| Set reference ID. | |
| void | onSetInt (Pt::int64_t value) |
| Compose a integer value. | |
| void | onSetReference (const char *id, std::size_t len) |
| Compose a reference. | |
| void | onSetString (const Pt::Char *value, std::size_t len) |
| Compose a string value. | |
| void | onSetTypeName (const char *type, std::size_t len) |
| Set type name. | |
| void | onSetUInt (Pt::uint64_t value) |
| Compose a unsigned integer value. | |
|
inherited |
This is only supported by formats that save typename information.
|
inherited |
This is only supported by formats that save typename information.
|
inherited |
This is only supported by formats that support references.
|
inherited |
This is only supported by formats that support references.
|
inherited |
There is only one method for all sizes of signed integer types, because that type information is not required for composition.
|
inherited |
There is only one method for all sizes of unsigned integer types, because that type information is not required for composition.