DiCE API nvidia_logo_transpbg.gif Up
mi::bridge::IBridge_snapshot_context Class Referenceabstract

Context to import, export, or remove snapshots. More...

#include <ibridge_server.h>

Inheritance diagram for mi::bridge::IBridge_snapshot_context:

Public Member Functions

virtual neuraylib::IImport_result * import_snapshot (neuraylib::ITransaction *transaction, const char *snapshot_id, const IMap *importer_options=0)=0
 Imports a previously saved snapshot from the disk cache. More...
 
virtual Sint32 remove_snapshot (const char *snapshot_id)=0
 Removes a snapshot from the disk cache. More...
 
virtual neuraylib::IExport_result * export_snapshot (neuraylib::ITransaction *transaction, const IArray *elements, const IMap *exporter_options, IString *snapshot_id)=0
 Exports a set of elements to the disk cache. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x9a9ceafe, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x9a9ceafe, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed Description

Context to import, export, or remove snapshots.

See also
mi::bridge::IBridge_server::create_snapshot_context()

Member Function Documentation

 export_snapshot()

virtual neuraylib::IExport_result * mi::bridge::IBridge_snapshot_context::export_snapshot ( neuraylib::ITransaction *  transaction,
const IArray elements,
const IMap exporter_options,
IString snapshot_id 
)
pure virtual

Exports a set of elements to the disk cache.

The following optional exporter options are supported:

  • "recurse" of type mi::IBoolean: If true, any elements referenced by the elements in the elements array are exported as well. Default: true.
Parameters
transactionThe transaction to use for the export.
elementsThe elements to export. Only supports element names as IString.
exporter_optionsThe exporter options.
[in,out]snapshot_idThe ID of the snapshot to use. If an empty string is passed an automatically generated unique identifier will be assigned to this string.
Returns
Result of the export operation with the following error codes:
  • 0: Success.
  • 6001: Invalid parameters.
  • 6002: Disk cache IO error.
  • 6003: Failed to serialize a database element.
  • 6004: Failed to export snapshot.
  • >= 6005: Unspecified error.

 import_snapshot()

virtual neuraylib::IImport_result * mi::bridge::IBridge_snapshot_context::import_snapshot ( neuraylib::ITransaction *  transaction,
const char *  snapshot_id,
const IMap importer_options = 0 
)
pure virtual

Imports a previously saved snapshot from the disk cache.

In the case of incremental snapshots the base snapshot must be loaded first, and then each incremental snapshot in sequence.

Currently no importer options are supported.

Parameters
transactionThe transaction into which to import the elements.
snapshot_idThe ID of the snapshot to import.
importer_optionsOptional importer options.
Returns
Result of the import operation with the following error codes:
  • 0: Success.
  • 4001: Invalid parameters.
  • 4002: Failed to open the disk cache.
  • 4003: There is no snapshot with the given ID in this disk cache.
  • 4004: Snapshot has an incompatible Bridge version.
  • 4005: Failed to import the snapshot elements.
  • >= 4006: Unspecified error.

 remove_snapshot()

virtual Sint32 mi::bridge::IBridge_snapshot_context::remove_snapshot ( const char *  snapshot_id)
pure virtual

Removes a snapshot from the disk cache.

Parameters
snapshot_idThe ID of the snapshot to remove.
Returns
  • 0: Success.
  • -1: Invalid parameters.
  • -2: Failed to open the disk cache.
  • -3: There is no snapshot with the given ID in this disk cache.
  • <= -4: Unspecified error