NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IDeserializer Class Referenceabstract

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

Inheritance diagram for mi::neuraylib::IDeserializer:
Inheritance graph
[legend]

Public Member Functions

virtual ISerializable deserialize ()=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...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x7052258a, 0x579b, 0x4861, 0x9c, 0x12, 0x5f, 0x02, 0x9c, 0x86, 0xfb, 0xce >
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< 0x7052258a, 0x579b, 0x4861, 0x9c, 0x12, 0x5f, 0x02, 0x9c, 0x86, 0xfb, 0xce >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. 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

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.

Template Parameters
T The interface type of the element to return
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.)