MDL SDK API nvidia_logo_transpbg.gif Up
ireader_writer_base.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IREADER_WRITER_BASE_H
8#define MI_NEURAYLIB_IREADER_WRITER_BASE_H
9
11
12namespace mi {
13
14namespace neuraylib {
15
16class IStream_position;
17
70 public base::Interface_declare<0x919370c2,0x2bb4,0x40db,0x81,0xff,0xd3,0x1c,0x52,0x10,0x54,0x64>
71{
72public:
75 virtual Sint32 get_error_number() const = 0;
76
81 virtual const char* get_error_message() const = 0;
82
86 virtual bool eof() const = 0;
87
89 virtual Sint32 get_file_descriptor() const = 0;
90
92
93
95 virtual bool supports_recorded_access() const = 0;
96
98 virtual const IStream_position* tell_position() const = 0;
99
105 virtual bool seek_position( const IStream_position* stream_position) = 0;
106
111 virtual bool rewind() = 0;
112
114
116
118 virtual bool supports_absolute_access() const = 0;
119
122 virtual Sint64 tell_absolute() const = 0;
123
129 virtual bool seek_absolute(Sint64 pos) = 0;
130
134 virtual Sint64 get_file_size() const = 0;
135
139 virtual bool seek_end() = 0;
140
142};
143 // end group mi_neuray_impexp
145
146} // namespace neuraylib
147
148} // namespace mi
149
150#endif // MI_NEURAYLIB_IREADER_WRITER_BASE_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Base interface for readers and writers.
Definition: ireader_writer_base.h:71
virtual const IStream_position * tell_position() const =0
Returns the current position in this stream.
virtual bool rewind()=0
Resets the stream position to the beginning.
virtual bool supports_recorded_access() const =0
Returns true if random recorded access is supported, and false otherwise.
virtual Sint32 get_error_number() const =0
Returns the error number of the last error that happened in this reader or writer,...
virtual bool supports_absolute_access() const =0
Returns true if random absolute access is supported, and false otherwise.
virtual const char * get_error_message() const =0
Returns the error message of the last error that happened in this reader or writer.
virtual bool seek_position(const IStream_position *stream_position)=0
Repositions the stream to the position stream_position.
virtual bool seek_end()=0
Sets the stream position to the end of the file.
virtual bool seek_absolute(Sint64 pos)=0
Repositions the stream to the absolute position pos.
virtual Sint64 get_file_size() const =0
Returns the size in bytes of the data in the stream.
virtual Sint64 tell_absolute() const =0
Returns the absolute position in bytes from the beginning of the stream beginning,...
virtual bool eof() const =0
Returns true if the end of the file has been reached.
virtual Sint32 get_file_descriptor() const =0
Returns the file descriptor of the stream, or -1 if it is not available.
Represents the position in a data stream.
Definition: istream_position.h:27
long long Sint64
64-bit signed integer.
Definition: types.h:61
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5