DiCE API nvidia_logo_transpbg.gif Up
ideserializer.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IDESERIALIZER_H
8#define MI_NEURAYLIB_IDESERIALIZER_H
9
12
13namespace mi {
14
15namespace neuraylib {
16
34 public base::Interface_declare<0x7052258a,0x579b,0x4861,0x9c,0x12,0x5f,0x02,0x9c,0x86,0xfb,0xce>
35{
36public:
40 virtual ISerializable* deserialize() = 0;
41
52 template <class T>
54 {
55 ISerializable* ptr_iserializable = deserialize();
56 if ( !ptr_iserializable)
57 return 0;
58 T* ptr_T = static_cast<T*>( ptr_iserializable->get_interface( typename T::IID()));
59 ptr_iserializable->release();
60 return ptr_T;
61 }
62
68 virtual bool read( bool* value, Size count = 1) = 0;
69
75 virtual bool read( Uint8* value, Size count = 1) = 0;
76
82 virtual bool read( Uint16* value, Size count = 1) = 0;
83
89 virtual bool read( Uint32* value, Size count = 1) = 0;
90
96 virtual bool read( Uint64* value, Size count = 1) = 0;
97
103 virtual bool read( Sint8* value, Size count = 1) = 0;
104
110 virtual bool read( Sint16* value, Size count = 1) = 0;
111
117 virtual bool read( Sint32* value, Size count = 1) = 0;
118
124 virtual bool read( Sint64* value, Size count = 1) = 0;
125
131 virtual bool read( Float32* value, Size count = 1) = 0;
132
138 virtual bool read( Float64* value, Size count = 1) = 0;
139
145 virtual bool read( Tag_struct* value, Size count = 1) = 0;
146};
147 // end group mi_neuray_plugins / mi_neuray_dice
149
150} // namespace neuraylib
151
152} // namespace mi
153
154#endif // MI_NEURAYLIB_IDESERIALIZER_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Source for deserializing objects from byte streams.
Definition: ideserializer.h:35
virtual bool read(Uint16 *value, Size count=1)=0
Reads values of type mi::Uint16 from the deserializer.
virtual bool read(Sint8 *value, Size count=1)=0
Reads values of type mi::Sint8 from the deserializer.
virtual bool read(Sint64 *value, Size count=1)=0
Reads values of type mi::Sint64 from the deserializer.
virtual bool read(Sint32 *value, Size count=1)=0
Reads values of type mi::Sint32 from the deserializer.
virtual bool read(Uint32 *value, Size count=1)=0
Reads values of type mi::Size from the deserializer.
virtual bool read(bool *value, Size count=1)=0
Reads values of type bool from the deserializer.
virtual bool read(Uint8 *value, Size count=1)=0
Reads values of type mi::Uint8 from the deserializer.
virtual bool read(Float64 *value, Size count=1)=0
Reads values of type mi::Float64 from the deserializer.
T * deserialize()
Reads a serializable object from the serializer.
Definition: ideserializer.h:53
virtual ISerializable * deserialize()=0
Reads a serializable object from the deserializer.
virtual bool read(Uint64 *value, Size count=1)=0
Reads values of type mi::Uint64 from the deserializer.
virtual bool read(Sint16 *value, Size count=1)=0
Reads values of type mi::Sint16 from the deserializer.
virtual bool read(Float32 *value, Size count=1)=0
Reads values of type mi::Float32 from the deserializer.
virtual bool read(Tag_struct *value, Size count=1)=0
Reads values of type mi::neuraylib::Tag_struct from the deserializer.
All serializable objects have to be derived from this interface.
Definition: iserializer.h:137
virtual const IInterface * get_interface(const Uuid &interface_id) const =0
Acquires a const interface from another.
virtual Uint32 release() const =0
Decrements the reference count.
long long Sint64
64-bit signed integer.
Definition: types.h:61
unsigned long long Uint64
64-bit unsigned integer.
Definition: types.h:62
signed short Sint16
16-bit signed integer.
Definition: types.h:45
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
unsigned char Uint8
8-bit unsigned integer.
Definition: types.h:47
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed char Sint8
8-bit signed integer.
Definition: types.h:44
double Float64
64-bit float.
Definition: types.h:52
float Float32
32-bit float.
Definition: types.h:51
unsigned short Uint16
16-bit unsigned integer.
Definition: types.h:48
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Serialization of objects to a byte stream.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89
A tag represents a unique identifier for database elements in the database.
Definition: iserializer.h:45