neuray API Programmer's Manual

mi::neuraylib::IExport_result Class Reference

[Importer and Exporter]

Description

This interface represents the result of an export operation. Such an export operation is triggered by mi::neuraylib::IExport_api::export_elements() or mi::neuraylib::IExport_api::export_scene(). It gives access to messages, message numbers, and and message severities.

Exporters should use the message severities according to the following guidelines:

  • mi::base::details::MESSAGE_SEVERITY_FATAL

    The exporter is no longer usable.

  • mi::base::details::MESSAGE_SEVERITY_ERROR

    The exporter was not able to export all elements successfully.

  • mi::base::details::MESSAGE_SEVERITY_WARNING

    A minor problem occurred during export.

  • mi::base::details::MESSAGE_SEVERITY_INFO

    A normal operational message.

  • mi::base::details::MESSAGE_SEVERITY_VERBOSE and mi::base::details::MESSAGE_SEVERITY_DEBUG

    These message severities should be avoided by exporters.

Public Member Functions

virtual const char* get_error_message() const =0
Returns the message of the first error. More...
virtual Uint32 get_error_number() const =0
Returns the number of the first error. More...
virtual const char* get_message( Size index) const =0
Returns a message from the array of messages. More...
virtual Uint32 get_message_number( Size index) const =0
Returns the message number for a given message from the array of messages. More...
virtual base::​Message_severity get_message_severity( Size index) const =0
Returns the severity for a given message from the array of messages. More...
virtual Size get_messages_length() const =0
Returns the number of messages.

Member Functions

virtual const char* mi::​neuraylib::​IExport_result::get_error_message() const [pure virtual]

Returns the message of the first error. A message describing the error condition corresponding to the error reported from get_error_number().

It is possible to query the all messages, see get_messages_length() and get_message( mi::Size)const. This method just reports the the first message of severity mi::base::details::MESSAGE_SEVERITY_ERROR or above, or NULL if there is no such message.

virtual Uint32 mi::​neuraylib::​IExport_result::get_error_number() const [pure virtual]

Returns the number of the first error. The error number indicates the status of the import operation: 0 means success, all other values indicate failures, in which case get_error_message() provides a diagnostic message. Numbers in the range 6000-7999 are reserved for custom exporters. All other numbers are reserved for other purposes.

It is possible to query the message numbers of all messages, see get_messages_length() and get_message_number( mi::Size)const. This method just reports the number of the first message of severity mi::base::details::MESSAGE_SEVERITY_ERROR or above, or 0 if there is no such message.

virtual const char* mi::​neuraylib::​IExport_result::get_message( Size index) const [pure virtual]

Returns a message from the array of messages. see get_messages_length()

virtual Uint32 mi::​neuraylib::​IExport_result::get_message_number( Size index) const [pure virtual]

Returns the message number for a given message from the array of messages. see get_messages_length()

virtual base::​Message_severity mi::​neuraylib::​IExport_result::get_message_severity( Size index) const [pure virtual]

Returns the severity for a given message from the array of messages. see get_messages_length()

virtual Size mi::​neuraylib::​IExport_result::get_messages_length() const [pure virtual]

Returns the number of messages.