neuray API Programmer's Manual

mi::neuraylib::IDeserializer Class Reference

[Mi_neuray_dice]

Description

Source for deserializing objects from byte streams. The deserializer can be used to deserialize objects from a byte stream. It is used when deserializing objects from disk, from a network connection, etc.

Arrays of values of a particular type can be deserialized with a single call by passing the array size as the count parameter. The address of subsequent array elements is obtained by pointer arithmetic.

Public Member Functions

virtual ISerializabledeserialize() =0
Reads a serializable object from the deserializer. More...
template< class T>T* deserialize()
Reads a serializable object from the serializer. More...
virtual bool  read( bool* value, Size count = 1) =0
Reads values of type bool from the deserializer. More...
virtual bool  read( Uint8* value, Size count = 1) =0
Reads values of type mi::Uint8 from the deserializer. More...
virtual bool  read( Uint16* value, Size count = 1) =0
Reads values of type mi::Uint16 from the deserializer. More...
virtual bool  read( Uint32* value, Size count = 1) =0
Reads values of type mi::Size from the deserializer. More...
virtual bool  read( Uint64* value, Size count = 1) =0
Reads values of type mi::Uint64 from the deserializer. More...
virtual bool  read( Sint8* value, Size count = 1) =0
Reads values of type mi::Sint8 from the deserializer. More...
virtual bool  read( Sint16* value, Size count = 1) =0
Reads values of type mi::Sint16 from the deserializer. More...
virtual bool  read( Sint32* value, Size count = 1) =0
Reads values of type mi::Sint32 from the deserializer. More...
virtual bool  read( Sint64* value, Size count = 1) =0
Reads values of type mi::Sint64 from the deserializer. More...
virtual bool  read( Float32* value, Size count = 1) =0
Reads values of type mi::Float32 from the deserializer. More...
virtual bool  read( Float64* value, Size count = 1) =0
Reads values of type mi::Float64 from the deserializer. More...
virtual bool  read( Tag_struct* value, Size count = 1) =0
Reads values of type mi::neuraylib::Tag_struct from the deserializer. More...

Member Functions

virtual ISerializable* mi::​neuraylib::​IDeserializer::deserialize() [pure virtual]

Reads a serializable object from the deserializer.

Returns

The deserialized object.

template< class T>

T* mi::​neuraylib::​IDeserializer::deserialize() [inline]

Reads a serializable object from the serializer. This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface( const Uuid&) on the returned pointer, since the return type already is a pointer to the type T specified as template parameter.

Returns

The deserialized object, or NULL if the element is not of type T .

virtual bool mi::​neuraylib::​IDeserializer::read( bool* value, Size count = 1) [pure virtual]

Reads values of type bool from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Uint8* value, Size count = 1) [pure virtual]

Reads values of type mi::Uint8 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Uint16* value, Size count = 1) [pure virtual]

Reads values of type mi::Uint16 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Uint32* value, Size count = 1) [pure virtual]

Reads values of type mi::Size from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Uint64* value, Size count = 1) [pure virtual]

Reads values of type mi::Uint64 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Sint8* value, Size count = 1) [pure virtual]

Reads values of type mi::Sint8 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Sint16* value, Size count = 1) [pure virtual]

Reads values of type mi::Sint16 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Sint32* value, Size count = 1) [pure virtual]

Reads values of type mi::Sint32 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Sint64* value, Size count = 1) [pure virtual]

Reads values of type mi::Sint64 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Float32* value, Size count = 1) [pure virtual]

Reads values of type mi::Float32 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Float64* value, Size count = 1) [pure virtual]

Reads values of type mi::Float64 from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)

virtual bool mi::​neuraylib::​IDeserializer::read( Tag_struct* value, Size count = 1) [pure virtual]

Reads values of type mi::neuraylib::Tag_struct from the deserializer.

Parameters

value
The address of the values to be read.
count
The number of values to be read.

Returns

true (The method does not fail.)