neuray API Programmer's Manual

mi::neuraylib::IWriter Class Reference

[Importer and Exporter]

Description

A writer supports binary block writes and string-oriented line writes that accept a zero-terminated string as argument.

Public Member Functions

virtual bool  flush() =0
Flushes all buffered output to the stream. More...
virtual Sint64 write( const char* buffer, Sint64 size) =0
Writes a number of bytes to the stream. More...
virtual bool  writeline( const char* str) =0
Writes a zero-terminated string to the stream. More...

Member Functions

virtual bool mi::​neuraylib::​IWriter::flush() [pure virtual]

Flushes all buffered output to the stream.

Returns

true in case of success, or false in case of errors.

virtual Sint64 mi::​neuraylib::​IWriter::write( const char* buffer, Sint64 size) [pure virtual]

Writes a number of bytes to the stream.

Parameters

buffer
The buffer from where to read the data.
size
The number of bytes to write.

Returns

The number of bytes written, or -1 in case of errors.

virtual bool mi::​neuraylib::​IWriter::writeline( const char* str) [pure virtual]

Writes a zero-terminated string to the stream.

Parameters

str
The string to be written. Note that the writer does not add an extra newline character at the end.

Returns

true in case of success, or false in case of errors.