Torque3D Documentation / _generateds / moduleManager_ScriptBinding.h

moduleManager_ScriptBinding.h

Engine/source/module/moduleManager_ScriptBinding.h

More...

Public Functions

DefineEngineMethod(ModuleManager , addListener , void , (const char *listenerObject) , ("") , "Registers the specified object as <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> listener <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@param listenerObject The object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> start receiving module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@return No return <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value.\n</a>" )
DefineEngineMethod(ModuleManager , canMergeModules , bool , (const char *mergeSourcePath) , ("") , "Checks whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge using the modules in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> path can current happen or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@param mergeSourcePath The path where modules <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> be merged are <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">located.\n</a>" "@return Whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge using the modules in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> path can current happen or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , copyModule , String , (const char *sourceModuleDefinition, const char *pTargetModuleId, const char *pTargetPath, const bool useVersionPathing) , ("", "", "", false) , "Copy the module <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> location with <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@param sourceModuleDefinition The module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">copy.\n</a>" "@param targetModuleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> rename the copied module <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> including all references <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> module Id.It is valid <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> specifiy the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> produce an identical <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">copy.\n</a>" "@param targetPath The target path <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy the module to.Addition folders will be created depending on whether 'useVersionPathing' is used or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@param useVersionPathing Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> '/targetModuleId/versionId' folder <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target path or not.This allows copying multiple versions of the same module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@return The <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> module definition <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> copy was successful or <a href="/coding/file/typesx86unix_8h/#typesx86unix_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , findModule , String , (const char *pModuleId, U32 pVersionId) , ("", 1) , "Find the specific module Id optionally at the specified version <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@return The module definition object or <a href="/coding/file/typesx86unix_8h/#typesx86unix_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> not <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">found.\n</a>" )
DefineEngineMethod(ModuleManager , findModuleByFilePath , String , (const char *filePath) , ("") , "Find the specific module Id optionally at the specified version <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@return The module definition object or <a href="/coding/file/typesx86unix_8h/#typesx86unix_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> not <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">found.\n</a>" )
DefineEngineMethod(ModuleManager , findModules , String , (bool loadedOnly) , (false) , "Find all the modules registered with the specified loaded <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">state.\n</a>" "@param loadedOnly Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> return only modules that are loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return A list of space - separated module definition object <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Ids.\n</a>" )
DefineEngineMethod(ModuleManager , findModuleTypes , String , (const char *pModuleType, bool loadedOnly) , ("", false) , "Find the modules registered with the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">type.\n</a>" "@param moduleType The module type <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> search <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">for.\n</a>" "@param loadedOnly Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> return only modules that are loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return A list of space - separated module definition object <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Ids.\n</a>" )
DefineEngineMethod(ModuleManager , ignoreLoadedGroups , void , (bool doIgnore) , (false) , "Sets <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the <a href="/coding/class/classmodule/">Module</a> Manager should ingore laoded <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">groups.\n</a>" "@param doIgnore Whether we should or should not ignore loaded <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">groups.\n</a>" "@return No return <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value.\n</a>" )
DefineEngineMethod(ModuleManager , isModuleMergeAvailable , bool , () , "Checks whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge definition <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> is available or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return Whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge definition <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> is available or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , loadExplicit , bool , (const char *pModuleId, S32 pVersionId) , ("", -1) , "Load the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">explicitly.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">load.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> load.Optional: Will load the latest <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">version.\n</a>" "@return Whether the module Id was loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , loadGroup , bool , (const char *pModuleGroup) , ("") , "Load the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">group.\n</a>" "@param moduleGroup The module group <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">load.\n</a>" "@return Whether the module group was loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , mergeModules , bool , (const char *pMergeTargetPath, bool removeMergeDefinition, bool registerNewModules) , ("", false, false) , "Performs <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge into the selected target <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">path.\n</a>" "@param mergeTargetPath The path where modules will be merged <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">into.\n</a>" "@param removeMergeDefinition Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> remove any merge definition found or not <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> merge is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">successful.\n</a>" "@param registerNewModules Whether <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> (not replaced or updated) modules should be registered or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return Whether the module merge was successful or not.Failure here could result in <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> corrupt module state.Reinstall is recommended or at least advised <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the user is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">recommended.\n</a>" )
DefineEngineMethod(ModuleManager , registerModule , bool , (const char *pModulePath, const char *pModuleFile) , ("", "") , "Register the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">module.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">register.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">register.\n</a>" "@return Whether the module was registered or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , removeListener , void , (const char *listenerObject) , ("") , "Unregisters the specified object as <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> listener <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@param listenerObject The object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> stop receiving module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@return No return <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value.\n</a>" )
DefineEngineMethod(ModuleManager , renameModule , bool , (const char *sourceModuleDefinition, const char *pNewModuleName) , ("", "") , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">module.\n</a>" "@param sourceModuleDefinition The module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">rename.\n</a>" "@param pNewModuleName The <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name the module should <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">have.\n</a>" "@return Weither the rename was successful or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , scanModules , bool , (const char *pRootPath, bool rootOnly) , ("", false) , "Scans <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> modules which are sub-directories of the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">path.\n</a>" "@param moduleRootPath The root directory <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> scan <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> sub - directories containing <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modules.\n</a>" "@param rootOnly - Specifies whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> only scan the root path or not when searching <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modules.\n</a>" "@return Whether the scan was successful or not.A successful scan can still find zero <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modules.\n</a>" )
DefineEngineMethod(ModuleManager , setModuleExtension , bool , (const char *moduleExtension) , ("") , "Set the module extension used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> scan <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> modules. The default is 'module'.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param moduleExtension The module extension used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> scan <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> modules.Do not use <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> period <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">character.\n</a>" "@return Whether setting the module extension was successful or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , synchronizeDependencies , bool , (const char *rootModuleDefinition, const char *pTargetDependencyFolder) , ("", "") , "Synchronize the module dependencies of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> target dependency <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">folder.\n</a>" "@param rootModuleDefinition The module definition used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> determine <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">dependencies.\n</a>" "@param targetDependencyPath The target dependency folder <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy dependencies <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to.\n</a>" "@return Whether the module dependencies were synchronized correctly or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , unloadExplicit , bool , (const char *pModuleId) , ("") , "Unload the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">explicitly.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unload.\n</a>" "@return Whether the module Id was unloaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , unloadGroup , bool , (const char *pModuleGroup) , ("") , "Unload the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">group.\n</a>" "@param moduleGroup The module group <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unload.\n</a>" "@return Whether the module group was unloaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , unregisterModule , bool , (const char *pModuleId, bool versionId) , ("", false) , "Unregister the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">module.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unregister.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unregister.\n</a>" "@return Whether the module was unregister or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

Detailed Description

Public Functions

DefineEngineMethod(ModuleManager , addListener , void , (const char *listenerObject) , ("") , "Registers the specified object as <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> listener <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@param listenerObject The object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> start receiving module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@return No return <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value.\n</a>" )

DefineEngineMethod(ModuleManager , canMergeModules , bool , (const char *mergeSourcePath) , ("") , "Checks whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge using the modules in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> path can current happen or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@param mergeSourcePath The path where modules <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> be merged are <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">located.\n</a>" "@return Whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge using the modules in the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> path can current happen or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , copyModule , String , (const char *sourceModuleDefinition, const char *pTargetModuleId, const char *pTargetPath, const bool useVersionPathing) , ("", "", "", false) , "Copy the module <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> location with <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@param sourceModuleDefinition The module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">copy.\n</a>" "@param targetModuleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> rename the copied module <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> including all references <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> module Id.It is valid <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> specifiy the <a href="/coding/file/pointer_8h/#pointer_8h_1adb82dfe18535e9a30aa97d275f82bd55">source</a> module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> produce an identical <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">copy.\n</a>" "@param targetPath The target path <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy the module to.Addition folders will be created depending on whether 'useVersionPathing' is used or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@param useVersionPathing Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> add <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> '/targetModuleId/versionId' folder <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the target path or not.This allows copying multiple versions of the same module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@return The <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> module definition <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> copy was successful or <a href="/coding/file/typesx86unix_8h/#typesx86unix_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , findModule , String , (const char *pModuleId, U32 pVersionId) , ("", 1) , "Find the specific module Id optionally at the specified version <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@return The module definition object or <a href="/coding/file/typesx86unix_8h/#typesx86unix_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> not <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">found.\n</a>" )

DefineEngineMethod(ModuleManager , findModuleByFilePath , String , (const char *filePath) , ("") , "Find the specific module Id optionally at the specified version <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Id.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">find.\n</a>" "@return The module definition object or <a href="/coding/file/typesx86unix_8h/#typesx86unix_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> not <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">found.\n</a>" )

DefineEngineMethod(ModuleManager , findModules , String , (bool loadedOnly) , (false) , "Find all the modules registered with the specified loaded <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">state.\n</a>" "@param loadedOnly Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> return only modules that are loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return A list of space - separated module definition object <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Ids.\n</a>" )

DefineEngineMethod(ModuleManager , findModuleTypes , String , (const char *pModuleType, bool loadedOnly) , ("", false) , "Find the modules registered with the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">type.\n</a>" "@param moduleType The module type <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> search <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">for.\n</a>" "@param loadedOnly Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> return only modules that are loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return A list of space - separated module definition object <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">Ids.\n</a>" )

DefineEngineMethod(ModuleManager , ignoreLoadedGroups , void , (bool doIgnore) , (false) , "Sets <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the <a href="/coding/class/classmodule/">Module</a> Manager should ingore laoded <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">groups.\n</a>" "@param doIgnore Whether we should or should not ignore loaded <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">groups.\n</a>" "@return No return <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value.\n</a>" )

DefineEngineMethod(ModuleManager , isModuleMergeAvailable , bool , () , "Checks whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge definition <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> is available or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return Whether <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge definition <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> is available or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , loadExplicit , bool , (const char *pModuleId, S32 pVersionId) , ("", -1) , "Load the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">explicitly.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">load.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> load.Optional: Will load the latest <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">version.\n</a>" "@return Whether the module Id was loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , loadGroup , bool , (const char *pModuleGroup) , ("") , "Load the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">group.\n</a>" "@param moduleGroup The module group <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">load.\n</a>" "@return Whether the module group was loaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , mergeModules , bool , (const char *pMergeTargetPath, bool removeMergeDefinition, bool registerNewModules) , ("", false, false) , "Performs <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module merge into the selected target <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">path.\n</a>" "@param mergeTargetPath The path where modules will be merged <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">into.\n</a>" "@param removeMergeDefinition Whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> remove any merge definition found or not <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> merge is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">successful.\n</a>" "@param registerNewModules Whether <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> (not replaced or updated) modules should be registered or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" "@return Whether the module merge was successful or not.Failure here could result in <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> corrupt module state.Reinstall is recommended or at least advised <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the user is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">recommended.\n</a>" )

DefineEngineMethod(ModuleManager , registerModule , bool , (const char *pModulePath, const char *pModuleFile) , ("", "") , "Register the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">module.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">register.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">register.\n</a>" "@return Whether the module was registered or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , removeListener , void , (const char *listenerObject) , ("") , "Unregisters the specified object as <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> listener <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@param listenerObject The object <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> stop receiving module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">notifications.\n</a>" "@return No return <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">value.\n</a>" )

DefineEngineMethod(ModuleManager , renameModule , bool , (const char *sourceModuleDefinition, const char *pNewModuleName) , ("", "") , "Rename <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">module.\n</a>" "@param sourceModuleDefinition The module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">rename.\n</a>" "@param pNewModuleName The <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> name the module should <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">have.\n</a>" "@return Weither the rename was successful or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , scanModules , bool , (const char *pRootPath, bool rootOnly) , ("", false) , "Scans <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> modules which are sub-directories of the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">path.\n</a>" "@param moduleRootPath The root directory <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> scan <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> sub - directories containing <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modules.\n</a>" "@param rootOnly - Specifies whether <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> only scan the root path or not when searching <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modules.\n</a>" "@return Whether the scan was successful or not.A successful scan can still find zero <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">modules.\n</a>" )

DefineEngineMethod(ModuleManager , setModuleExtension , bool , (const char *moduleExtension) , ("") , "Set the module extension used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> scan <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> modules. The default is 'module'.\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param moduleExtension The module extension used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> scan <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> modules.Do not use <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> period <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">character.\n</a>" "@return Whether setting the module extension was successful or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , synchronizeDependencies , bool , (const char *rootModuleDefinition, const char *pTargetDependencyFolder) , ("", "") , "Synchronize the module dependencies of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> target dependency <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">folder.\n</a>" "@param rootModuleDefinition The module definition used <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> determine <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">dependencies.\n</a>" "@param targetDependencyPath The target dependency folder <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy dependencies <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">to.\n</a>" "@return Whether the module dependencies were synchronized correctly or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , unloadExplicit , bool , (const char *pModuleId) , ("") , "Unload the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">explicitly.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unload.\n</a>" "@return Whether the module Id was unloaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , unloadGroup , bool , (const char *pModuleGroup) , ("") , "Unload the specified module <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">group.\n</a>" "@param moduleGroup The module group <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unload.\n</a>" "@return Whether the module group was unloaded or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

DefineEngineMethod(ModuleManager , unregisterModule , bool , (const char *pModuleId, bool versionId) , ("", false) , "Unregister the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">module.\n</a>" "@param moduleId The module Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unregister.\n</a>" "@param versionId The version Id <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">unregister.\n</a>" "@return Whether the module was unregister or <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )

  1
  2//-----------------------------------------------------------------------------
  3// Copyright (c) 2013 GarageGames, LLC
  4//
  5// Permission is hereby granted, free of charge, to any person obtaining a copy
  6// of this software and associated documentation files (the "Software"), to
  7// deal in the Software without restriction, including without limitation the
  8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9// sell copies of the Software, and to permit persons to whom the Software is
 10// furnished to do so, subject to the following conditions:
 11//
 12// The above copyright notice and this permission notice shall be included in
 13// all copies or substantial portions of the Software.
 14//
 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 21// IN THE SOFTWARE.
 22//-----------------------------------------------------------------------------
 23#include "console/engineAPI.h"
 24#include "moduleDefinition.h"
 25#include "moduleManager.h"
 26
 27DefineEngineMethod(ModuleManager, setModuleExtension, bool, (const char* moduleExtension), (""),
 28   "Set the module extension used to scan for modules.  The default is 'module'.\n"
 29   "@param moduleExtension The module extension used to scan for modules.Do not use a period character.\n"
 30   "@return Whether setting the module extension was successful or not.\n")
 31{
 32    // Set module extension.
 33   return object->setModuleExtension(moduleExtension);
 34}
 35
 36//-----------------------------------------------------------------------------
 37
 38DefineEngineMethod(ModuleManager, scanModules, bool, (const char* pRootPath, bool rootOnly), ("", false),
 39   "Scans for modules which are sub-directories of the specified path.\n"
 40   "@param moduleRootPath The root directory to scan for sub - directories containing modules.\n"
 41   "@param rootOnly[Optional] - Specifies whether to only scan the root path or not when searching for modules.\n"
 42   "@return Whether the scan was successful or not.A successful scan can still find zero modules.\n")
 43{
 44    // Scan modules.
 45    return object->scanModules( pRootPath, rootOnly );
 46}
 47
 48//-----------------------------------------------------------------------------
 49
 50DefineEngineMethod(ModuleManager, registerModule, bool, (const char* pModulePath, const char* pModuleFile), ("", ""),
 51   "Register the specified module.\n"
 52   "@param moduleId The module Id to register.\n"
 53   "@param versionId The version Id to register.\n"
 54   "@return Whether the module was registered or not.\n")
 55{
 56   // Unregister the module.
 57   return object->registerModule(pModulePath, pModuleFile);
 58}
 59
 60DefineEngineMethod(ModuleManager, unregisterModule, bool, (const char* pModuleId, bool versionId), ("", false),
 61   "Unregister the specified module.\n"
 62   "@param moduleId The module Id to unregister.\n"
 63   "@param versionId The version Id to unregister.\n"
 64   "@return Whether the module was unregister or not.\n")
 65{
 66    // Unregister the module.
 67    return object->unregisterModule( pModuleId, versionId );
 68}
 69
 70//-----------------------------------------------------------------------------
 71
 72DefineEngineMethod(ModuleManager, loadGroup, bool, (const char* pModuleGroup), (""),
 73   "Load the specified module group.\n"
 74   "@param moduleGroup The module group to load.\n"
 75   "@return Whether the module group was loaded or not.\n")
 76{
 77    // Load module group.
 78   return object->loadModuleGroup(pModuleGroup);
 79}
 80
 81//-----------------------------------------------------------------------------
 82
 83DefineEngineMethod(ModuleManager, unloadGroup, bool, (const char* pModuleGroup), (""),
 84   "Unload the specified module group.\n"
 85   "@param moduleGroup The module group to unload.\n"
 86   "@return Whether the module group was unloaded or not.\n")
 87{
 88    // Unload module group.
 89   return object->unloadModuleGroup(pModuleGroup);
 90}
 91
 92//-----------------------------------------------------------------------------
 93
 94DefineEngineMethod(ModuleManager, loadExplicit, bool, (const char* pModuleId, S32 pVersionId), ("", -1),
 95   "Load the specified module explicitly.\n"
 96   "@param moduleId The module Id to load.\n"
 97   "@param versionId The version Id to load.Optional:  Will load the latest version.\n"
 98   "@return Whether the module Id was loaded or not.\n")
 99{
100    if (pVersionId == -1)
101       return object->loadModuleExplicit(pModuleId);
102    else
103       return object->loadModuleExplicit(pModuleId, pVersionId);
104}
105
106//-----------------------------------------------------------------------------
107
108DefineEngineMethod(ModuleManager, unloadExplicit, bool, (const char* pModuleId), (""),
109   "Unload the specified module explicitly.\n"
110   "@param moduleId The module Id to unload.\n"
111   "@return Whether the module Id was unloaded or not.\n")
112{
113    // Unload module Id explicitly.
114   return object->unloadModuleExplicit(pModuleId);
115}
116
117//-----------------------------------------------------------------------------
118
119DefineEngineMethod(ModuleManager, findModule, String, (const char* pModuleId, U32 pVersionId), ("", 1),
120   "Find the specific module Id optionally at the specified version Id.\n"
121   "@param moduleId The module Id to find.\n"
122   "@param versionId The version Id to find.\n"
123   "@return The module definition object or NULL if not found.\n")
124{
125    // Find module definition.
126   ModuleDefinition* pModuleDefinition = object->findModule(pModuleId, pVersionId);
127
128    // Return nothing if not found.
129    if ( pModuleDefinition == NULL )
130        return StringTable->EmptyString();
131
132    return pModuleDefinition->getIdString();
133}
134
135//-----------------------------------------------------------------------------
136
137DefineEngineMethod(ModuleManager, findModuleByFilePath, String, (const char* filePath), (""),
138   "Find the specific module Id optionally at the specified version Id.\n"
139   "@param moduleId The module Id to find.\n"
140   "@param versionId The version Id to find.\n"
141   "@return The module definition object or NULL if not found.\n")
142{
143   // Find module definition.
144   ModuleDefinition* pModuleDefinition = object->findModuleByFilePath(StringTable->insert(filePath));
145
146   // Return nothing if not found.
147   if (pModuleDefinition == NULL)
148      return StringTable->EmptyString();
149
150   return pModuleDefinition->getIdString();
151}
152
153//-----------------------------------------------------------------------------
154
155DefineEngineMethod(ModuleManager, findModules, String, (bool loadedOnly), (false),
156   "Find all the modules registered with the specified loaded state.\n"
157   "@param loadedOnly Whether to return only modules that are loaded or not.\n"
158   "@return A list of space - separated module definition object Ids.\n")
159{
160    // Find module type definitions.
161    Vector<const ModuleDefinition*> moduleDefinitions;
162
163    // Find modules.
164    object->findModules( loadedOnly, moduleDefinitions );
165
166    // Fetch module definition count.
167    const U32 moduleDefinitionCount = (U32)moduleDefinitions.size();
168
169    // Finish if no module definition were found.
170    if ( moduleDefinitionCount == 0 )
171       return StringTable->EmptyString();
172
173    // Create a return buffer.
174    S32 bufferSize = 4096;
175    char* pReturnBuffer = Con::getReturnBuffer( bufferSize );
176    char* pBufferWrite = pReturnBuffer;
177
178    // Iterate module definitions.
179    for ( ModuleManager::typeConstModuleDefinitionVector::const_iterator moduleDefinitionItr = moduleDefinitions.begin(); moduleDefinitionItr != moduleDefinitions.end(); ++moduleDefinitionItr )
180    {
181        // Fetch module definition.
182        const ModuleDefinition* pModuleDefinition = *moduleDefinitionItr;
183
184        // Format module definition.
185        const U32 offset = dSprintf( pBufferWrite, bufferSize, "%d ", pModuleDefinition->getId() );
186        pBufferWrite += offset;
187        bufferSize -= offset;
188
189        // Are we out of buffer space?
190        if ( bufferSize <= 0 )
191        {
192            // Yes, so warn.
193            Con::warnf( "ModuleManager::findModules() - Ran out of buffer space." );
194            break;
195        }
196    }
197
198    return pReturnBuffer;
199}
200
201//-----------------------------------------------------------------------------
202
203DefineEngineMethod(ModuleManager, findModuleTypes, String, (const char* pModuleType, bool loadedOnly), ("", false),
204   "Find the modules registered with the specified module type.\n"
205   "@param moduleType The module type to search for.\n"
206   "@param loadedOnly Whether to return only modules that are loaded or not.\n"
207   "@return A list of space - separated module definition object Ids.\n")
208{
209    // Find module type definitions.
210    Vector<const ModuleDefinition*> moduleDefinitions;
211
212    // Find module types.
213    object->findModuleTypes( pModuleType, loadedOnly, moduleDefinitions );
214
215    // Fetch module definition count.
216    const U32 moduleDefinitionCount = (U32)moduleDefinitions.size();
217
218    // Finish if no module definition were found.
219    if ( moduleDefinitionCount == 0 )
220       return StringTable->EmptyString();
221
222    // Create a return buffer.
223    S32 bufferSize = 4096;
224    char* pReturnBuffer = Con::getReturnBuffer( bufferSize );
225    char* pBufferWrite = pReturnBuffer;
226
227    // Iterate module definitions.
228    for ( ModuleManager::typeConstModuleDefinitionVector::const_iterator moduleDefinitionItr = moduleDefinitions.begin(); moduleDefinitionItr != moduleDefinitions.end(); ++moduleDefinitionItr )
229    {
230        // Fetch module definition.
231        const ModuleDefinition* pModuleDefinition = *moduleDefinitionItr;
232
233        // Format module definition.
234        const U32 offset = dSprintf( pBufferWrite, bufferSize, "%d ", pModuleDefinition->getId() );
235        pBufferWrite += offset;
236        bufferSize -= offset;
237
238        // Are we out of buffer space?
239        if ( bufferSize <= 0 )
240        {
241            // Yes, so warn.
242            Con::warnf( "ModuleManager::findTypes() - Ran out of buffer space." );
243            break;
244        }
245    }
246
247    return pReturnBuffer;
248}
249
250//-----------------------------------------------------------------------------
251
252DefineEngineMethod(ModuleManager, copyModule, String, (const char* sourceModuleDefinition, const char* pTargetModuleId, const char* pTargetPath, const bool useVersionPathing), 
253   ("", "", "", false),
254   "Copy the module to a new location with a new module Id.\n"
255   "@param sourceModuleDefinition The module definition to copy.\n"
256   "@param targetModuleId The module Id to rename the copied module to including all references to the source module Id.It is valid to specifiy the source module Id to produce an identical copy.\n"
257   "@param targetPath The target path to copy the module to.Addition folders will be created depending on whether 'useVersionPathing' is used or not.\n"
258   "@param useVersionPathing Whether to add a '/targetModuleId/versionId' folder to the target path or not.This allows copying multiple versions of the same module Id.\n"
259   "@return The new module definition file if copy was successful or NULL if not.\n")
260{
261   // Find the source module definition.
262   ModuleDefinition* pSourceModuleDefinition = dynamic_cast<ModuleDefinition*>(Sim::findObject(sourceModuleDefinition));
263
264   // Was the module definition found?
265   if ( pSourceModuleDefinition == NULL )
266   {
267      // No, so warn.
268      Con::warnf("ModuleManager::copyModule() - Could not find source module definition '%s'.", sourceModuleDefinition);
269      return "";
270   }
271
272    // Copy module.
273    return object->copyModule( pSourceModuleDefinition, pTargetModuleId, pTargetPath, useVersionPathing );
274}
275
276//-----------------------------------------------------------------------------
277
278DefineEngineMethod(ModuleManager, renameModule, bool, (const char* sourceModuleDefinition, const char* pNewModuleName),
279("", ""),
280"Rename a module.\n"
281"@param sourceModuleDefinition The module definition to rename.\n"
282"@param pNewModuleName The new name the module should have.\n"
283"@return Weither the rename was successful or not.\n")
284{
285   // Find the source module definition.
286   ModuleDefinition* pSourceModuleDefinition = dynamic_cast<ModuleDefinition*>(Sim::findObject(sourceModuleDefinition));
287
288   // Was the module definition found?
289   if (pSourceModuleDefinition == NULL)
290   {
291      // No, so warn.
292      Con::warnf("ModuleManager::renameModule() - Could not find source module definition '%s'.", sourceModuleDefinition);
293      return "";
294   }
295
296   // Copy module.
297   return object->renameModule(pSourceModuleDefinition, pNewModuleName);
298}
299
300//-----------------------------------------------------------------------------
301
302DefineEngineMethod(ModuleManager, synchronizeDependencies, bool, (const char* rootModuleDefinition, const char* pTargetDependencyFolder), ("", ""),
303   "Synchronize the module dependencies of a module definition to a target dependency folder.\n"
304   "@param rootModuleDefinition The module definition used to determine dependencies.\n"
305   "@param targetDependencyPath The target dependency folder to copy dependencies to.\n"
306   "@return Whether the module dependencies were synchronized correctly or not.\n")
307{
308    // Find the root module definition.
309   ModuleDefinition* pRootModuleDefinition = dynamic_cast<ModuleDefinition*>(Sim::findObject(rootModuleDefinition));
310
311    // Was the module definition found?
312    if ( pRootModuleDefinition == NULL )
313    {
314        // No, so warn.
315       Con::warnf("ModuleManager::synchronizeModules() - Could not find root module definition '%s'.", rootModuleDefinition);
316        return false;
317    }
318
319    // Synchronize dependencies.
320    return object->synchronizeDependencies( pRootModuleDefinition, pTargetDependencyFolder );
321}
322
323//-----------------------------------------------------------------------------
324
325DefineEngineMethod(ModuleManager, isModuleMergeAvailable, bool, (),,
326   "Checks whether a module merge definition file is available or not.\n"
327   "@return Whether a module merge definition file is available or not.\n")
328{
329    // Check if module merge is available or not.
330    return object->isModuleMergeAvailable();
331}
332
333//-----------------------------------------------------------------------------
334
335DefineEngineMethod(ModuleManager, canMergeModules, bool, (const char* mergeSourcePath), (""),
336   "Checks whether a module merge using the modules in the source path can current happen or not.\n"
337   "@param mergeSourcePath The path where modules to be merged are located.\n"
338   "@return Whether a module merge using the modules in the source path can current happen or not.\n")
339{
340    // Check whether the merge modules can current happen or not.
341   return object->canMergeModules(mergeSourcePath);
342}
343
344//-----------------------------------------------------------------------------
345
346DefineEngineMethod(ModuleManager, mergeModules, bool, (const char* pMergeTargetPath, bool removeMergeDefinition, bool registerNewModules), ("", false, false),
347   "Performs a module merge into the selected target path.\n"
348   "@param mergeTargetPath The path where modules will be merged into.\n"
349   "@param removeMergeDefinition Whether to remove any merge definition found or not if merge is successful.\n"
350   "@param registerNewModules Whether new (not replaced or updated) modules should be registered or not.\n"
351   "@return Whether the module merge was successful or not.Failure here could result in a corrupt module state.Reinstall is recommended or at least advised to the user is recommended.\n")
352{
353    // Merge modules.
354    return object->mergeModules( pMergeTargetPath, removeMergeDefinition, registerNewModules );
355}
356
357//-----------------------------------------------------------------------------
358
359DefineEngineMethod(ModuleManager, addListener, void, (const char* listenerObject), (""),
360   "Registers the specified object as a listener for module notifications.\n"
361   "@param listenerObject The object to start receiving module notifications.\n"
362   "@return No return value.\n")
363{
364    // Find object.
365   SimObject* pListener = Sim::findObject(listenerObject);
366
367    // Did we find the listener object?
368    if ( pListener == NULL )
369    {
370        // No, so warn.
371       Con::warnf("ModuleManager::addNotifications() - Could not find the listener object '%s'.", listenerObject);
372        return;
373    }
374
375    object->addListener( pListener );
376}
377
378//-----------------------------------------------------------------------------
379
380DefineEngineMethod(ModuleManager, removeListener, void, (const char* listenerObject), (""),
381   "Unregisters the specified object as a listener for module notifications.\n"
382   "@param listenerObject The object to stop receiving module notifications.\n"
383   "@return No return value.\n")
384{
385    // Find object.
386   SimObject* pListener = Sim::findObject(listenerObject);
387
388    // Did we find the listener object?
389    if ( pListener == NULL )
390    {
391        // No, so warn.
392       Con::warnf("ModuleManager::removeNotifications() - Could not find the listener object '%s'.", listenerObject);
393        return;
394    }
395
396    object->removeListener( pListener );
397}
398
399//-----------------------------------------------------------------------------
400
401DefineEngineMethod(ModuleManager, ignoreLoadedGroups, void, (bool doIgnore), (false),
402   "Sets if the Module Manager should ingore laoded groups.\n"
403   "@param doIgnore Whether we should or should not ignore loaded groups.\n"
404   "@return No return value.\n")
405{
406   // Check whether the merge modules can current happen or not.
407   return object->setIgnoreLoadedGroups(doIgnore);
408}
409