libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
integra_api::IModuleManager Class Referenceabstract

Provides funtionality to interact with 3rd party, embedded and in-development modules. More...

#include "api/module_manager.h"

Public Member Functions

virtual CError install_module (const string &module_file, CModuleInstallResult &result)=0
 install 3rd party module from a file More...
 
virtual CError install_embedded_module (const GUID &module_id)=0
 install a module which is embedded in a .integra file More...
 
virtual CError uninstall_module (const GUID &module_id, CModuleUninstallResult &result)=0
 uninstall a 3rd party module More...
 
virtual CError load_module_in_development (const string &module_file, CLoadModuleInDevelopmentResult &result)=0
 load a module into memory without installing it More...
 
virtual CError unload_unused_embedded_modules ()=0
 unloads all embedded modules for which no instances exist More...
 

Detailed Description

Provides funtionality to interact with 3rd party, embedded and in-development modules.

see http://www.integralive.org/tutorials/module-development-guide/#what-is-a-module

Member Function Documentation

virtual CError integra_api::IModuleManager::install_embedded_module ( const GUID module_id)
pure virtual

install a module which is embedded in a .integra file

When a .integra file is loaded which contains modules which are not currently loaded, they are loaded into memory as 'embedded' modules. This command allows such embedded modules to be copied into the 3rd party modules directory ie installed as 3rd party modules

Parameters
module_idid of the embedded module to install
Returns
an error code. Can be CError::SUCCESS, CError::FAILED or CError::INPUT_ERROR
virtual CError integra_api::IModuleManager::install_module ( const string &  module_file,
CModuleInstallResult result 
)
pure virtual

install 3rd party module from a file

If the module is not already installed (as system or 3rd party), installs it (as a 3rd party module)

Parameters
module_filePath to the .module file to install
[out]resultCModuleInstallResult to receive information about the result of the operation
Returns
an error code. Can be CError::SUCCESS, CError::FILE_VALIDATION_ERROR, CError::FAILED, CError::INPUT_ERROR or CError::MODULE_ALREADY_INSTALLED
virtual CError integra_api::IModuleManager::load_module_in_development ( const string &  module_file,
CLoadModuleInDevelopmentResult result 
)
pure virtual

load a module into memory without installing it

This function exists to enable a smooth workflow during module development. A single module can be loaded as IInterfaceDefinition::MODULE_IN_DEVELOPMENT, allowing seemless testing from Integra Module Creator There can only ever be one in-development module loaded at a time. If another in-development module is already loaded, it is unloaded, unless instances of the previous in-development module exist (in which case, the previous in-develepment module changes to IInterfaceDefinition::MODULE_EMBEDDED and remains in memory.

Parameters
module_filePath to the .module file to install
[out]resultCLoadModuleInDevelopmentResult to receive information about the result of the operation
Returns
an error code. Can be CError::SUCCESS, CError::FAILED or CError::INPUT_ERROR
virtual CError integra_api::IModuleManager::uninstall_module ( const GUID module_id,
CModuleUninstallResult result 
)
pure virtual

uninstall a 3rd party module

If there are existing instances of the 3rd party module to uninstall, the uninstallation goes ahead, but the module remains in memory as an 'embedded' module, and the existing instance remain.

Parameters
module_idid of the 3rd party module to uninstall
[out]resultCModuleUninstallResult to receive information about the result of the operation
Returns
an error code. Can be CError::SUCCESS, CError::FAILED or CError::INPUT_ERROR
virtual CError integra_api::IModuleManager::unload_unused_embedded_modules ( )
pure virtual

unloads all embedded modules for which no instances exist

When the last instance of an embedded module is deleted, the module is not automatically unloaded. This enables users of the libIntegra api to implement undo functionality - deleted modules can be re-added and will still exist. unload_unused_embedded_modules allows for a tidy up of unused embedded modules

Returns
and error code. Can be xxx

The documentation for this class was generated from the following file: