Class SBIFileImporter#
This class is the base class for importers. More...
#include <SBIFileImporter.hpp>
Public Functions#
| Type | Name |
|---|---|
| virtual bool | canImportFromFile (const std::string & fileName) Returns true when the filefileName can be imported using this importer. |
| virtual std::string | getExtension () const Returns the extension, e.g. "pdb". |
| virtual std::string | getFilter () const Returns the filter, e.g. "Protein Data Bank (*.pdb)" (Qt format) |
| SBGFileImporter * | getPropertyDialog () const Returns the property dialog of the importer. |
| virtual bool | importFromFile (const std::string & fileName, const SBValueMap & parameterMap=SBValueMap{}, SBDDocumentFolder * preferredFolder=nullptr) = 0 Imports data from a file fileName into the folderpreferredFolder with the givenparameters . |
| void | setPropertyDialog (SBGFileImporter * g) Sets the property dialog of the importer. |
| virtual | ~SBIFileImporter () Destroys the SBIFileImporter . |
Protected Attributes#
| Type | Name |
|---|---|
| SBGFileImporter * | propertyDialog |
Protected Functions#
| Type | Name |
|---|---|
| SBIFileImporter () Constructs an SBIFileImporter . |
Detailed Description#
Short name: SBImporter
Public Functions Documentation#
function canImportFromFile#
Returns true when the filefileName can be imported using this importer.
Determines whether this importer can import data from the specified file.
This function is called before trying to import a file and is particularly useful if there are multiple importers each supporting different subsets of the format. If your importer supports only a subset of the format then you can check in this function whether the file corresponds to this format and return the result.
By default it returns true and doesn't check for the file's extension.
Parameters:
fileNameThe name of the file to check.
Returns:
true if the file can be imported; otherwise false.
function getExtension#
Returns the extension, e.g. "pdb".
Returns the default file extension for this importer.
Returns:
The file extension (e.g., "pdb").
function getFilter#
Returns the filter, e.g. "Protein Data Bank (*.pdb)" (Qt format)
Returns the file filter string for this importer.
Returns:
The filter string (e.g., "Protein Data Bank (*.pdb)").
function getPropertyDialog#
Returns the property dialog of the importer.
Returns the property dialog associated with this importer.
Returns:
Pointer to the SBGFileImporter representing the property dialog; may be nullptr if none is set.
function importFromFile#
Imports data from a file fileName into the folderpreferredFolder with the givenparameters .
virtual bool SBIFileImporter::importFromFile (
const std::string & fileName,
const SBValueMap & parameterMap=SBValueMap {},
SBDDocumentFolder * preferredFolder=nullptr
) = 0
function setPropertyDialog#
Sets the property dialog of the importer.
Sets the property dialog for this importer.
Parameters:
gPointer to the property dialog to associate with this importer.
function ~SBIFileImporter#
Destroys the SBIFileImporter .
Protected Attributes Documentation#
variable propertyDialog#
Protected Functions Documentation#
function SBIFileImporter#
Constructs an SBIFileImporter .