MDL SDK API nvidia_logo_transpbg.gif Up
ireader_writer_base.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2022 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
71 public base::Interface_declare<0x919370c2,0x2bb4,0x40db,0x81,0xff,0xd3,0x1c,0x52,0x10,0x54,0x64>
72{
73public:
76 virtual Sint32 get_error_number() const = 0;
77
80 virtual const char* get_error_message() const = 0;
81
84 virtual bool eof() const = 0;
85
87 virtual Sint32 get_file_descriptor() const = 0;
88
90
91
93 virtual bool supports_recorded_access() const = 0;
94
96 virtual const IStream_position* tell_position() const = 0;
97
102 virtual bool seek_position( const IStream_position* stream_position) = 0;
103
107 virtual bool rewind() = 0;
108
110
112
114 virtual bool supports_absolute_access() const = 0;
115
118 virtual Sint64 tell_absolute() const = 0;
119
124 virtual bool seek_absolute(Sint64 pos) = 0;
125
128 virtual Sint64 get_file_size() const = 0;
129
132 virtual bool seek_end() = 0;
133
135};
136 // end group mi_neuray_impexp
138
139} // namespace neuraylib
140
141} // namespace mi
142
143#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:72
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:59
signed int Sint32
32-bit signed integer.
Definition: types.h:44
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5