Target for serializing objects to byte streams. More...
Public Member Functions | |
virtual bool | serialize (const ISerializable *serializable)=0 |
Writes a serializable object to the serializer. More... |
|
virtual bool | write (const bool *value, Size count=1)=0 |
Writes values of type bool to the serializer. More... |
|
virtual bool | write (const Uint8 *value, Size count=1)=0 |
Writes values of type mi::Uint8 to the serializer. More... |
|
virtual bool | write (const Uint16 *value, Size count=1)=0 |
Writes values of type mi::Uint16 to the serializer. More... |
|
virtual bool | write (const Uint32 *value, Size count=1)=0 |
Writes values of type mi::Size to the serializer. More... |
|
virtual bool | write (const Uint64 *value, Size count=1)=0 |
Writes values of type mi::Uint64 to the serializer. More... |
|
virtual bool | write (const Sint8 *value, Size count=1)=0 |
Writes values of type mi::Sint8 to the serializer. More... |
|
virtual bool | write (const Sint16 *value, Size count=1)=0 |
Writes values of type mi::Sint16 to the serializer. More... |
|
virtual bool | write (const Sint32 *value, Size count=1)=0 |
Writes values of type mi::Sint32 to the serializer. More... |
|
virtual bool | write (const Sint64 *value, Size count=1)=0 |
Writes values of type mi::Sint64 to the serializer. More... |
|
virtual bool | write (const Float32 *value, Size count=1)=0 |
Writes values of type mi::Float32 to the serializer. More... |
|
virtual bool | write (const Float64 *value, Size count=1)=0 |
Writes values of type mi::Float64 to the serializer. More... |
|
virtual void | reserve (Size capacity)=0 |
Gives a hint to the serializer about the required buffer size. More... |
|
virtual void | flush ()=0 |
Flushes the so-far serialized data. More... |
|
virtual bool | write (const Tag_struct *value, Size count=1)=0 |
Writes values of type mi::neuraylib::Tag_struct to the serializer. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xdcf5a659, 0x2b06, 0x436b, 0x82, 0x55, 0x36, 0x9d, 0xbd, 0xe7, 0x42, 0xb1 > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, IInterface > |
Self |
Own type. More... |
|
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > |
IID |
Declares the interface ID (IID) of this interface. More... |
|
Static Public Member Functions inherited from mi::base::Interface_declare< 0xdcf5a659, 0x2b06, 0x436b, 0x82, 0x55, 0x36, 0x9d, 0xbd, 0xe7, 0x42, 0xb1 > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Target for serializing objects to byte streams.
The serializer can be used to serialize objects to a byte stream. It is used when serializing objects to disk, to a network connection, etc.
Arrays of values of a particular type can be serialized with a single call by passing the array size as the count
parameter. The address of subsequent array elements is obtained by pointer arithmetic.
|
pure virtual |
Flushes the so-far serialized data.
The meaning of flushing depends on the context in which the serializer is used. If flushing is not supported in some context, nothing happens. If flushing is supported in some context, it typically means to process the already serialized data in the same way as the entire data at the end of the serialization would have been processed. For example, large buffers whose content is produced slowly over time can be subdivided into smaller chunks which can then be processed earlier than the entire buffer.
|
pure virtual |
Gives a hint to the serializer about the required buffer size.
Advises the serializer to resize its internal buffer such that it can hold at least capacity
additional bytes. This information can be useful to avoid frequent reallocations that might be necessary if large amounts of data are written.
|
pure virtual |
Writes a serializable object to the serializer.
serializable | The object to serialize. |
true
, unless the class is not registered.
|
pure virtual |
Writes values of type bool to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.) Writes values of type mi::Uint8 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Uint16 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Size to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Uint64 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.) Writes values of type mi::Sint8 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Sint16 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Sint32 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Sint64 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Float32 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::Float64 to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)
|
pure virtual |
Writes values of type mi::neuraylib::Tag_struct to the serializer.
value | The address of the values to be written. |
count | The number of values to be written. |
true
(The method does not fail.)