NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IImpexp_state Class Referenceabstract

This interface represents states that are passed to recursive calls of importers and exporters. More...

Inheritance diagram for mi::neuraylib::IImpexp_state:
Inheritance graph
[legend]

Public Member Functions

virtual const char *  get_uri () const =0
  Returns the URI for this file. More...
 
virtual Uint32  get_line_number () const =0
  Returns the line number after the last read or write operation. More...
 
virtual void  set_line_number (Uint32 n)=0
  Sets the line number to n. More...
 
virtual void  incr_line_number ()=0
  Convenience function that increments the line number by one. More...
 
virtual const IImpexp_state get_parent_state () const =0
  Returns the state of the parent importer or exporter. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x8646a2cb, 0x609f, 0x453d, 0xbd, 0xd6, 0xc7, 0xbf, 0xea, 0xdd, 0x82, 0x1d >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
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< 0x8646a2cb, 0x609f, 0x453d, 0xbd, 0xd6, 0xc7, 0xbf, 0xea, 0xdd, 0x82, 0x1d >
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

This interface represents states that are passed to recursive calls of importers and exporters.

It carries all state information that a recursive importer call may need to access from its calling importer, such as the URI and the current line number. It is, for example, used to provide proper diagnostics. The class implementing the state needs to be derived from this mi::neuraylib::IImpexp_state class.

Importer and exporter classes have a factory function to create the state object. This allows the calling function to create a state, initialize it and querying the number of lines imported after running the actual importer.

Importers and exporters can enrich their implementation of the state with additional information they may need to import or export specific formats recursively.

Member Function Documentation

virtual Uint32 mi::neuraylib::IImpexp_state::get_line_number ( ) const
pure virtual

Returns the line number after the last read or write operation.

Line number counting starts with 1 for the first line. Only applicable for line oriented file formats.

virtual const IImpexp_state* mi::neuraylib::IImpexp_state::get_parent_state ( ) const
pure virtual

Returns the state of the parent importer or exporter.

The parent importer or exporter is the one that called the current importer or exporter. Returns NULL if there is no parent importer or exporter.

virtual const char* mi::neuraylib::IImpexp_state::get_uri ( ) const
pure virtual

Returns the URI for this file.

Returns
The URI of the associated file, or NULL if there is no associated file, e.g., for string-based import/export operations.
virtual void mi::neuraylib::IImpexp_state::incr_line_number ( )
pure virtual

Convenience function that increments the line number by one.

Line number counting starts with 1 for the first line.

virtual void mi::neuraylib::IImpexp_state::set_line_number ( Uint32  n)
pure virtual

Sets the line number to n.

Line number counting starts with 1 for the first line.