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

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

Inheritance diagram for mi::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 if the current importer or exporter was called by another importer or exporter (the parent). 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 informations 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::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::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::IImpexp_state::get_parent_state ( ) const
pure virtual

Returns the state of the parent importer or exporter if the current importer or exporter was called by another importer or exporter (the parent).

Returns 0 if the current importer or exporter is not called from another importer or exporter.

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

Returns the URI for this file.

virtual void mi::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::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.