DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::IDeserializer Class Referenceabstract

Source for deserializing objects from byte streams. More...

#include <ideserializer.h>

Inheritance diagram for mi::neuraylib::IDeserializer:

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...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x7052258a, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x7052258a, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed 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.

Member Function Documentation

 deserialize() [1/2]

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.

Template Parameters
TThe interface type of the element to return
Returns
The deserialized object, or NULL if the element is not of type T.

 deserialize() [2/2]

virtual ISerializable * mi::neuraylib::IDeserializer::deserialize ( )
pure virtual

Reads a serializable object from the deserializer.

Returns
The deserialized object.

 read() [1/12]

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

Reads values of type bool from the deserializer.

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [2/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [3/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [4/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [5/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [6/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [7/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [8/12]

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
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [9/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [10/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [11/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)

 read() [12/12]

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

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

Parameters
valueThe address of the values to be read.
countThe number of values to be read.
Returns
true (The method does not fail.)