The VgIDatabase interface is used to load and select the data that will be displayed in the 3D view. More...
Public Member Functions | |
virtual | ~VgIDatabase () |
Destructor. | |
virtual bool | loadConfiguration (const std::string &pConfigFilename, UInt pSecretKey, const std::string &pLicenseGeneratorURL=VgEngine::msEmptyString)=0 |
Loads a database configuration from a mass storage. | |
virtual void | unloadConfiguration ()=0 |
unloads the current configuration if there is one. | |
virtual bool | getCachedLicenseFilenameForConfiguration (const std::string &pConfigFilename, std::string &pOutLicenseFilename)=0 |
returns the name of the cached license path for a given configuration filename. | |
virtual bool | selectDataset (const std::string &pDatasetName)=0 |
Selects a dataset using its name. | |
virtual bool | selectDataset (int pIndex)=0 |
Selects a dataset using its index. | |
virtual const VgIDatabaseDatasetDescriptor * | getCurrentDatasetDescriptor () const =0 |
Retrieves the descriptor of the current dataset. | |
virtual const std::vector < VgIDatabaseDatasetDescriptor > & | getDatasetDescriptors () const =0 |
Retrieves the vector of all available datasets. | |
Protected Member Functions | |
VgIDatabase () | |
Constructor. |
The VgIDatabase interface is used to load and select the data that will be displayed in the 3D view.
This interface depends on how databases are bundled. First, the data structure, with all available datasets, is described in a configuration file. This file must be loaded (using the VgIDatabase::loadConfiguration method), then a particular dataset can be selected to be displayed in the 3D view (using the VgIDatabase::selectDataset method).
Example:
... editEngine()->editDatabase()->loadConfiguration("vg_config.xml", 0, "http://license.visioglobe.com/renew/secret-string-to-retreive-my-license"); ... if (pUserSelectedWashington) { editEngine()->editDatabase()->selectDataset("Washington"); } else if (pUserSelectedParis) { editEngine()->editDatabase()->selectDataset("Paris"); } editEngine()->editDatabase()->getCurrentDatasetDescriptor(); ...
VgEngine::VgIDatabase::VgIDatabase | ( | ) | [inline, protected] |
Constructor.
virtual VgEngine::VgIDatabase::~VgIDatabase | ( | ) | [inline, virtual] |
Destructor.
virtual bool VgEngine::VgIDatabase::getCachedLicenseFilenameForConfiguration | ( | const std::string & | pConfigFilename, |
std::string & | pOutLicenseFilename | ||
) | [pure virtual] |
returns the name of the cached license path for a given configuration filename.
pConfigFilename | path to vg_config file. must be an absolute filename | |
[out] | pOutLicenseFilename | reference to a string, will receive the license file path if there is one. |
virtual const VgIDatabaseDatasetDescriptor* VgEngine::VgIDatabase::getCurrentDatasetDescriptor | ( | ) | const [pure virtual] |
Retrieves the descriptor of the current dataset.
virtual const std::vector< VgIDatabaseDatasetDescriptor >& VgEngine::VgIDatabase::getDatasetDescriptors | ( | ) | const [pure virtual] |
Retrieves the vector of all available datasets.
virtual bool VgEngine::VgIDatabase::loadConfiguration | ( | const std::string & | pConfigFilename, |
UInt | pSecretKey, | ||
const std::string & | pLicenseGeneratorURL = VgEngine::msEmptyString |
||
) | [pure virtual] |
Loads a database configuration from a mass storage.
pConfigFilename | The name of the configuration file to be loaded. |
pSecretKey | The secret key that matches the secret key that was used to generate the associated licence xml file's hash code. |
pLicenseGeneratorURL | The URL that will be reached to get the license if missing. |
virtual bool VgEngine::VgIDatabase::selectDataset | ( | const std::string & | pDatasetName ) | [pure virtual] |
Selects a dataset using its name.
Visual data will be rendered on the view during the preceding display.
pDatasetName | The name of the dataset. Needs to match the name of a dataset defined within the currently loaded configuration file. |
virtual bool VgEngine::VgIDatabase::selectDataset | ( | int | pIndex ) | [pure virtual] |
Selects a dataset using its index.
Visual data will be rendered on the view during the preceding display.
pIndex | Index of dataset, indicated by it's position relative to other datasets within the configuration file (starting at 0). |
virtual void VgEngine::VgIDatabase::unloadConfiguration | ( | ) | [pure virtual] |
unloads the current configuration if there is one.
It releases the resources and stops any threads created