VisioMove SDK (iOS)  2.1.22
VgEngine::VgIDatabase Interface Referenceabstract

Public Member Functions

virtual ~VgIDatabase ()
 
virtual bool loadConfiguration (const std::string &pConfigFilename, UInt pSecretKey, const std::string &pLicenseGeneratorURL=VgEngine::msEmptyString)=0
 
virtual void unloadConfiguration ()=0
 
virtual bool getCachedLicenseFilenameForConfiguration (const std::string &pConfigFilename, std::string &pOutLicenseFilename)=0
 
virtual bool selectDataset (const std::string &pDatasetName)=0
 
virtual bool selectDataset (int pIndex)=0
 
virtual const VgIDatabaseDatasetDescriptorgetCurrentDatasetDescriptor () const =0
 
virtual const std::vector< VgIDatabaseDatasetDescriptor > & getDatasetDescriptors () const =0
 

Protected Member Functions

 VgIDatabase ()
 

Detailed Description

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-retrieve-my-license");
...
if (pUserSelectedWashington) {
editEngine()->editDatabase()->selectDataset("Washington");
} else if (pUserSelectedParis) {
editEngine()->editDatabase()->selectDataset("Paris");
}
editEngine()->editDatabase()->getCurrentDatasetDescriptor();
...

Constructor & Destructor Documentation

VgEngine::VgIDatabase::VgIDatabase ( )
inlineprotected

Constructor.

virtual VgEngine::VgIDatabase::~VgIDatabase ( )
inlinevirtual

Destructor.

References VgEngine::msEmptyString.

Member Function Documentation

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.

Parameters
pConfigFilenamepath to vg_config file. must be an absolute filename
pOutLicenseFilenamereference to a string, will receive the license file path if there is one.
Returns
true if a cached license exists for the given configuration, in which case it fills the pOutLicenseFilename parameter.
Remarks
this function is used to cleanup after removing a locally stored map.
virtual const VgIDatabaseDatasetDescriptor* VgEngine::VgIDatabase::getCurrentDatasetDescriptor ( ) const
pure virtual

Retrieves the descriptor of the current dataset.

Returns
Descriptor of the currently loaded dataset. If there isn't a valid current database dataset descriptor, then NULL will be returned.
virtual const std::vector< VgIDatabaseDatasetDescriptor >& VgEngine::VgIDatabase::getDatasetDescriptors ( ) const
pure virtual

Retrieves the vector of all available datasets.

Returns
Vector of descriptors for 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.

Parameters
pConfigFilenameThe path of the configuration file to be loaded. This parameter may be either an abosolute path or (on iOS only) it may be a path relative to the application directory: {APPLICATIONS_DIRECTORY}/{GUID_DIRECTORY}/{NAME_OF_APP}.app/
pSecretKeyThe secret key that matches the secret key that was used to generate the associated licence xml file's hash code.
pLicenseGeneratorURLThe URL that will be reached to get the license if missing.
Returns
true if the configuration file was loaded successfully, otherwise false.
Remarks
If loadConfiguration() returns false, the VgIEngine::getLastError() and VgIEngine::getErrorString() can be used in conjunction to find the reason.
If loadConfiguration() needs to update the license file from the network it will create a cached license. This filename can be retrieved with bool getCachedLicenseFilenameForConfiguration()
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.

Parameters
pDatasetNameThe name of the dataset. Needs to match the name of a dataset defined within the currently loaded configuration file.
Returns
true if a new dataset was loaded, otherwise false. In case of failure, the previous dataset remains active.
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.

Parameters
pIndexIndex of dataset, indicated by it's position relative to other datasets within the configuration file (starting at 0).
Returns
true if a new dataset was loaded, otherwise false. In case of failure, the previous dataset is still active.
virtual void VgEngine::VgIDatabase::unloadConfiguration ( )
pure virtual

unloads the current configuration if there is one. It releases the resources and stops any threads created

Version
2.0.7865

The documentation for this interface was generated from the following file:
VisioMove 2.1.22, Visioglobe® 2016