NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::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::IWriter:
Inheritance graph
[legend]

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, IReader_writer_base >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
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, 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::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::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::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.