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

Abstract base interface common for importers and exporters. More...

Inheritance diagram for mi::IImpexp_base:
Inheritance graph
[legend]

Public Member Functions

virtual IImpexp_state create_impexp_state (const char *uri, const IImpexp_state *parent_state=0) const =0
  Returns a state suitable for passing it to a recursive import or export call. More...
 
virtual bool  test_file_type (const char *extension) const =0
  Indicates whether a file name extension is supported. More...
 
virtual Impexp_priority  get_priority () const =0
  Returns the priority of the importer or exporter. More...
 
virtual const char *  get_supported_extensions (Uint32 i) const =0
  Returns the i -th supported file name extension. More...
 
virtual const char *  get_name () const =0
  Returns a concise single-line clear text description of the importer or exporter. More...
 
virtual const char *  get_author () const =0
  Returns a concise single-line clear text description of the author of this importer or exporter. More...
 
virtual base::Uuid  get_uuid () const =0
  Returns the unique identifier for the importer or exporter. More...
 
virtual Uint32  get_major_version () const =0
  Returns the major version number of the importer or exporter. More...
 
virtual Uint32  get_minor_version () const =0
  Returns the minor version number of the importer or exporter. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xf14bab60, 0x91d8, 0x4a78, 0xaa, 0xc4, 0x6d, 0x14, 0x02, 0xb1, 0x97, 0x47 >
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< 0xf14bab60, 0x91d8, 0x4a78, 0xaa, 0xc4, 0x6d, 0x14, 0x02, 0xb1, 0x97, 0x47 >
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

Abstract base interface common for importers and exporters.

The common functionality of importers and exporters comprises a factory function for the corresponding state, a test function to indicate support of a particular file extension, and additional methods to provide information about the importer or exporter, like author, version number, UUID, and so on.

Member Function Documentation

virtual IImpexp_state* mi::IImpexp_base::create_impexp_state ( const char *  uri,
const IImpexp_state parent_state = 0 
) const
pure virtual

Returns a state suitable for passing it to a recursive import or export call.

The parameters are used to initialize the corresponding properties of the state. The line number is set to 1.

virtual const char* mi::IImpexp_base::get_author ( ) const
pure virtual

Returns a concise single-line clear text description of the author of this importer or exporter.

This description may be used to support user interaction, such as in command-line help or selection boxes of graphical user interfaces. This method must return a valid string.

This description is also used in the importer or exporter selection algorithm, which selects among importers and exporters of the same name and same author the one that has the highest version number.

virtual Uint32 mi::IImpexp_base::get_major_version ( ) const
pure virtual

Returns the major version number of the importer or exporter.

If you register multiple importers or exporters with equal name and author, the importer or exporter with the higher version number will be taken. A version number is higher if the version number is higher, or if it is equal and the minor version number is higher major (lexicographic order).

virtual Uint32 mi::IImpexp_base::get_minor_version ( ) const
pure virtual

Returns the minor version number of the importer or exporter.

If you register multiple importers or exporters with equal name and author, the importer or exporter with the higher version number will be taken. A version number is higher if the version number is higher, or if it is equal and the minor version number is higher major (lexicographic order).

virtual const char* mi::IImpexp_base::get_name ( ) const
pure virtual

Returns a concise single-line clear text description of the importer or exporter.

The description should name, besides maybe a product or brand name, the supported file format and, if applicable, the major file type version or versions that are supported. If a file format differs sufficiently from version to version, you may as well register different importers or exporters for each version.

This description may be used to support user interaction, such as in command-line help or selection boxes of graphical user interfaces. This method must return a valid string. This description is also used in the importer or exporter selection algorithm, which selects among importers and exporters of the same name and same author the one that has the highest version number.

virtual Impexp_priority mi::IImpexp_base::get_priority ( ) const
pure virtual

Returns the priority of the importer or exporter.

The priority expresses the confidence of the importer or exporter that its test_file_type() method can identify the file and that the file format is fully supported.

virtual const char* mi::IImpexp_base::get_supported_extensions ( Uint32  i) const
pure virtual

Returns the i -th supported file name extension.

The file name extension includes the separating dot.

Returns
The file name extension, or NULL if i is out of range.
virtual base::Uuid mi::IImpexp_base::get_uuid ( ) const
pure virtual

Returns the unique identifier for the importer or exporter.

You can register only one importer or exporter for a particular UUID. If you wish to support installations with multiple versions of your importer or exporter, you have to change the UUID for each minor and major version number change.

virtual bool mi::IImpexp_base::test_file_type ( const char *  extension) const
pure virtual

Indicates whether a file name extension is supported.

Returns true if the importer or exporter can handle the file type determined by the file name extension. The extension is defined as the part of the file name after and including the first dot, for example, ".mi".

See Also
mi::neuraylib::IImporter::test_file_type(), mi::neuraylib::IExporter::test_file_type()
These more specific versions also pass an mi::IReader or mi::IWriter as argument, which can be used to look at lookahead data for magic file headers (readers only) or to decide if the reader or writer capabilities are sufficient to do the import or export (for example, random access capability).