ideserializer.h File Reference
Description
Deserialization of objects from a byte stream.
Code Example
ideserializer.h
/***************************************************************************************************
* Copyright 2024 NVIDIA Corporation. All rights reserved.
**************************************************************************************************/
#ifndef MI_NEURAYLIB_IDESERIALIZER_H
#define MI_NEURAYLIB_IDESERIALIZER_H
#include <mi/base/interface_declare.h>
#include <mi/neuraylib/iserializer.h>
namespace mi {
namespace neuraylib {
class IDeserializer :
public base::Interface_declare<0x7052258a,0x579b,0x4861,0x9c,0x12,0x5f,0x02,0x9c,0x86,0xfb,0xce>
{
public:
virtual ISerializable* deserialize() = 0;
template <class T>
T* deserialize()
{
ISerializable* ptr_iserializable = deserialize();
if ( !ptr_iserializable)
return 0;
T* ptr_T = static_cast<T*>( ptr_iserializable->get_interface( typename T::IID()));
ptr_iserializable->release();
return ptr_T;
}
virtual bool read( bool* value, Size count = 1) = 0;
virtual bool read( Uint8* value, Size count = 1) = 0;
virtual bool read( Uint16* value, Size count = 1) = 0;
virtual bool read( Uint32* value, Size count = 1) = 0;
virtual bool read( Uint64* value, Size count = 1) = 0;
virtual bool read( Sint8* value, Size count = 1) = 0;
virtual bool read( Sint16* value, Size count = 1) = 0;
virtual bool read( Sint32* value, Size count = 1) = 0;
virtual bool read( Sint64* value, Size count = 1) = 0;
virtual bool read( Float32* value, Size count = 1) = 0;
virtual bool read( Float64* value, Size count = 1) = 0;
virtual bool read( Tag_struct* value, Size count = 1) = 0;
};
// end group mi_neuray_plugins / mi_neuray_dice
} // namespace neuraylib
} // namespace mi
#endif // MI_NEURAYLIB_IDESERIALIZER_H
Namespaces
- namespace
- Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
- namespace
- Namespace for the neuray API. More...
Classes
- class
- Source for deserializing objects from byte streams. More...