Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IWriter Class Referenceabstract

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

Inheritance diagram for mi::neuraylib::IWriter:
mi::base::Interface_declare< 0x0e6ecfbc, 0x78c3, 0x4082, 0xba, 0x51, 0xa3, 0x60, 0xbb, 0x1d, 0x6f, 0xc0, neuraylib::IReader_writer_base > mi::neuraylib::IReader_writer_base mi::base::Interface_declare< 0x919370c2, 0x2bb4, 0x40db, 0x81, 0xff, 0xd3, 0x1c, 0x52, 0x10, 0x54, 0x64 > mi::base::IInterface

Public Member Functions

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...
 
virtual bool flush ()=0
 Flushes all buffered output to the stream. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x0e6ecfbc, 0x78c3, 0x4082, 0xba, 0x51, 0xa3, 0x60, 0xbb, 0x1d, 0x6f, 0xc0, neuraylib::IReader_writer_base >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
neuraylib::IReader_writer_base
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x0e6ecfbc, 0x78c3, 0x4082, 0xba, 0x51, 0xa3, 0x60, 0xbb, 0x1d, 0x6f, 0xc0, neuraylib::IReader_writer_base >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

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

Member Function Documentation

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
bufferThe buffer from where to read the data.
sizeThe 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
strThe 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.