ImporterResource Class Reference

This is a helper class when using the Importer interface. More...

#include <PlugInResource.h>

Inheritance diagram for ImporterResource:

Inheritance graph

List of all members.

Public Member Functions

 ImporterResource (Progress *pProgress=NULL, bool batch=true)
 ImporterResource (const std::string &importerName, Progress *pProgress=NULL, bool batch=true)
 ImporterResource (const std::string &importerName, const std::string &filename, Progress *pProgress=NULL, bool batch=true)
 ImporterResource (const std::string &importerName, const std::vector< std::string > &filenames, Progress *pProgress=NULL, bool batch=true)
 ImporterResource (const std::string &importerName, const std::map< std::string, std::vector< ImportDescriptor * > > &datasets, Progress *pProgress=NULL, bool batch=true)
 ImporterResource (PlugIn *pPlugIn, const std::map< std::string, std::vector< ImportDescriptor * > > &descriptors, Progress *pProgress=NULL, bool batch=true)


Detailed Description

This is a helper class when using the Importer interface.

This class manages an instance of an ImportAgent that provides the actual helper methods when working with instances of Importer plug-ins.

See also:
ImportAgent, Importer, Using ImporterResource

Definition at line 199 of file PlugInResource.h.


Constructor & Destructor Documentation

ImporterResource::ImporterResource ( Progress pProgress = NULL,
bool  batch = true 
)

Creates an invalid object for delayed initialization of an ImportAgent.

Creates an invalid object where no importer is initially created. The importer can then be initialized later by calling setPlugIn().

Parameters:
pProgress The progress object to pass into the importer. If NULL is passed in, a progress object is obtained by calling PlugInManagerServices::getProgress().
batch Set this value to true to execute the importer in batch mode or to false to execute the importer in interactive mode.
Exceptions:
std::logic_error Thrown if the instantiate() method is called more than once on this instance.

ImportAgent
This class simply allocates and controls the lifecycle of an ImportAgent object. You can use -> to access any of the methods available on ImportAgent.

Definition at line 210 of file PlugInResource.h.

ImporterResource::ImporterResource ( const std::string &  importerName,
Progress pProgress = NULL,
bool  batch = true 
)

Creates an importer to import data.

Creates the importer but does not specify the files or data sets to import. The setFilename(), setFilenames(), or setDatasets() method must therefore be called before calling execute().

Parameters:
importerName The name of the importer to create and execute.
pProgress The progress object to pass into the importer. If NULL is passed in, a progress object is obtained by calling PlugInManagerServices::getProgress().
batch Set this value to true to execute the importer in batch mode or to false to execute the importer in interactive mode.
Exceptions:
std::logic_error Thrown if the instantiate() method is called more than once on this instance.

ImportAgent
This class simply allocates and controls the lifecycle of an ImportAgent object. You can use -> to access any of the methods available on ImportAgent.

Definition at line 227 of file PlugInResource.h.

ImporterResource::ImporterResource ( const std::string &  importerName,
const std::string &  filename,
Progress pProgress = NULL,
bool  batch = true 
)

Creates an importer to import data from a single file.

When importing data from a file, all data sets returned by Importer::getImportDescriptors() are imported.

Parameters:
importerName The name of the importer to create and execute.
filename The file from which to load the data.
pProgress The progress object to pass into the importer. If NULL is passed in, a progress object is obtained by calling PlugInManagerServices::getProgress().
batch Set this value to true to execute the importer in batch mode or to false to execute the importer in interactive mode.
Exceptions:
std::logic_error Thrown if the instantiate() method is called more than once on this instance.

ImportAgent
This class simply allocates and controls the lifecycle of an ImportAgent object. You can use -> to access any of the methods available on ImportAgent.

Definition at line 244 of file PlugInResource.h.

ImporterResource::ImporterResource ( const std::string &  importerName,
const std::vector< std::string > &  filenames,
Progress pProgress = NULL,
bool  batch = true 
)

Creates an importer to import data from multiple files.

When importing data from multiple files, all data sets returned by Importer::getImportDescriptors() are imported.

Parameters:
importerName The name of the importer to create and execute.
filenames The files from which to load the data.
pProgress The progress object to pass into the importer. If NULL is passed in, a progress object is obtained by calling PlugInManagerServices::getProgress().
batch Set this value to true to execute the importer in batch mode or to false to execute the importer in interactive mode.
Exceptions:
std::logic_error Thrown if the instantiate() method is called more than once on this instance.

ImportAgent
This class simply allocates and controls the lifecycle of an ImportAgent object. You can use -> to access any of the methods available on ImportAgent.

Definition at line 262 of file PlugInResource.h.

ImporterResource::ImporterResource ( const std::string &  importerName,
const std::map< std::string, std::vector< ImportDescriptor * > > &  datasets,
Progress pProgress = NULL,
bool  batch = true 
)

Creates an importer to import individual data sets from one or more files.

Parameters:
importerName The name of the importer to create and execute.
datasets The files and data sets to import. The descriptor values should have been obtained by calling Importer::getImportDescriptors(). The provided import descriptors will be owned by the agent.
pProgress The progress object to pass into the importer. If NULL is passed in, a progress object is obtained by calling PlugInManagerServices::getProgress().
batch Set this value to true to execute the importer in batch mode or to false to execute the importer in interactive mode.
Exceptions:
std::logic_error Thrown if the instantiate() method is called more than once on this instance.

ImportAgent
This class simply allocates and controls the lifecycle of an ImportAgent object. You can use -> to access any of the methods available on ImportAgent.

Definition at line 280 of file PlugInResource.h.

ImporterResource::ImporterResource ( PlugIn pPlugIn,
const std::map< std::string, std::vector< ImportDescriptor * > > &  descriptors,
Progress pProgress = NULL,
bool  batch = true 
)

Uses an existing importer to import individual data sets from one or more files.

Parameters:
pPlugIn The importer to execute. The agent assumes ownership of the importer and will destroy it as necessary upon agent destruction.
descriptors The files and data sets to import. The descriptor values should have been obtained by calling Importer::getImportDescriptors(). The provided import descriptors will be owned by the agent.
pProgress The progress object to pass into the importer. If NULL is passed in, a progress object is obtained by calling PlugInManagerServices::getProgress().
batch Set this value to true to execute the importer in batch mode or to false to execute the importer in interactive mode.
Exceptions:
std::logic_error Thrown if the instantiate() method is called more than once on this instance.

ImportAgent
This class simply allocates and controls the lifecycle of an ImportAgent object. You can use -> to access any of the methods available on ImportAgent.

Definition at line 299 of file PlugInResource.h.


Software Development Kit - Opticks 4.9.0 Build 16218