Trippin Cyril
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | List of all members
trippingcyril::SubModuleLoader Class Referenceabstract

Our submodule loader, use this to load modules from within modules (we need to go deeper) More...

#include <SubModuleLoader.h>

Public Member Functions

 SubModuleLoader ()
 
virtual ~SubModuleLoader ()
 
bool LoadModule (const String &path, const String &config="")
 Loads to module. More...
 
bool UnloadModule (const String &modName, String &retMsg)
 Unloads a previously loaded module. More...
 
ModuleFindModule (const String &module)
 Get a loaded module using it's name. More...
 
size_t LoadedModules () const
 
std::vector< Module * >
::const_iterator 
begin () const
 
std::vector< Module * >
::const_iterator 
end () const
 

Protected Member Functions

virtual bool validateModule (const Module *module, String &retMsg)=0
 

Detailed Description

Our submodule loader, use this to load modules from within modules (we need to go deeper)

Constructor & Destructor Documentation

trippingcyril::SubModuleLoader::SubModuleLoader ( )
virtual trippingcyril::SubModuleLoader::~SubModuleLoader ( )
virtual

Member Function Documentation

std::vector<Module*>::const_iterator trippingcyril::SubModuleLoader::begin ( ) const
inline
std::vector<Module*>::const_iterator trippingcyril::SubModuleLoader::end ( ) const
inline
Module* trippingcyril::SubModuleLoader::FindModule ( const String module)

Get a loaded module using it's name.

Parameters
moduleThe name of the module
Returns
The module if found, NULL otherwise
size_t trippingcyril::SubModuleLoader::LoadedModules ( ) const
inline
Returns
The amount of loaded modules
bool trippingcyril::SubModuleLoader::LoadModule ( const String path,
const String config = "" 
)

Loads to module.

Parameters
pathThe path of the module to load
configPath to config file
Returns
True if the module was succesfully loaded
bool trippingcyril::SubModuleLoader::UnloadModule ( const String modName,
String retMsg 
)

Unloads a previously loaded module.

Parameters
modNameThe name of the module to unload
retMsgThe return message
Returns
True if the module was succesfully unloaded
virtual bool trippingcyril::SubModuleLoader::validateModule ( const Module module,
String retMsg 
)
protectedpure virtual

Override this to validateModules, as you'll want to make sure that all your modules are the same.

Parameters
moduleThe module to validate
retMsgIf you refuse it, it would be nice to fill in why in this parameter
Returns
True if valid, false otherwise. It'll automatically get unloaded then.

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