moduleManager_ScriptBinding.h
Engine/source/module/moduleManager_ScriptBinding.h
Public Functions
DefineEngineMethod(ModuleManager , addListener , void , (const char *listenerObject) , ("") , "Registers the specified object as 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 module merge using the modules in the source 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 module merge using the modules in the source 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 <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> location with 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 source module Id.It is valid <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> specifiy the source 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 '/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_1a2594a51175f310ed96ad6cd7d6514878">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_1a2594a51175f310ed96ad6cd7d6514878">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , findModule , String , (const char *pModuleId, U32 pVersionId) , ("", 0) , "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_1a2594a51175f310ed96ad6cd7d6514878">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 , isModuleMergeAvailable , bool , () , "Checks whether 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 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 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_1a2594a51175f310ed96ad6cd7d6514878">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 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 , removeListener , void , (const char *listenerObject) , ("") , "Unregisters the specified object as 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 , 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 <a href="/coding/file/talgorithm_8h/#talgorithm_8h_1a113846f47aa4d2409fe12e783dcd69cf">find</a> 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 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 module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</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 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 module merge using the modules in the source 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 module merge using the modules in the source 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 <a href="/coding/file/tmm__on_8h/#tmm__on_8h_1a1ac41480eb2e4aadd52252ee550b630a">new</a> location with 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 source module Id.It is valid <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> specifiy the source 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 '/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_1a2594a51175f310ed96ad6cd7d6514878">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_1a2594a51175f310ed96ad6cd7d6514878">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">not.\n</a>" )
DefineEngineMethod(ModuleManager , findModule , String , (const char *pModuleId, U32 pVersionId) , ("", 0) , "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_1a2594a51175f310ed96ad6cd7d6514878">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 , isModuleMergeAvailable , bool , () , "Checks whether 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 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 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_1a2594a51175f310ed96ad6cd7d6514878">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 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 , removeListener , void , (const char *listenerObject) , ("") , "Unregisters the specified object as 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 , 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 <a href="/coding/file/talgorithm_8h/#talgorithm_8h_1a113846f47aa4d2409fe12e783dcd69cf">find</a> 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 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 module definition <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</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, unregisterModule, bool, (const char* pModuleId, bool versionId), ("", false), 51 "Unregister the specified module.\n" 52 "@param moduleId The module Id to unregister.\n" 53 "@param versionId The version Id to unregister.\n" 54 "@return Whether the module was unregister or not.\n") 55{ 56 // Unregister the module. 57 return object->unregisterModule( pModuleId, versionId ); 58} 59 60//----------------------------------------------------------------------------- 61 62DefineEngineMethod(ModuleManager, loadGroup, bool, (const char* pModuleGroup), (""), 63 "Load the specified module group.\n" 64 "@param moduleGroup The module group to load.\n" 65 "@return Whether the module group was loaded or not.\n") 66{ 67 // Load module group. 68 return object->loadModuleGroup(pModuleGroup); 69} 70 71//----------------------------------------------------------------------------- 72 73DefineEngineMethod(ModuleManager, unloadGroup, bool, (const char* pModuleGroup), (""), 74 "Unload the specified module group.\n" 75 "@param moduleGroup The module group to unload.\n" 76 "@return Whether the module group was unloaded or not.\n") 77{ 78 // Unload module group. 79 return object->unloadModuleGroup(pModuleGroup); 80} 81 82//----------------------------------------------------------------------------- 83 84DefineEngineMethod(ModuleManager, loadExplicit, bool, (const char* pModuleId, S32 pVersionId), ("", -1), 85 "Load the specified module explicitly.\n" 86 "@param moduleId The module Id to load.\n" 87 "@param versionId The version Id to load.Optional: Will load the latest version.\n" 88 "@return Whether the module Id was loaded or not.\n") 89{ 90 if (pVersionId == -1) 91 return object->loadModuleExplicit(pModuleId); 92 else 93 return object->loadModuleExplicit(pModuleId, pVersionId); 94} 95 96//----------------------------------------------------------------------------- 97 98DefineEngineMethod(ModuleManager, unloadExplicit, bool, (const char* pModuleId), (""), 99 "Unload the specified module explicitly.\n" 100 "@param moduleId The module Id to unload.\n" 101 "@return Whether the module Id was unloaded or not.\n") 102{ 103 // Unload module Id explicitly. 104 return object->unloadModuleExplicit(pModuleId); 105} 106 107//----------------------------------------------------------------------------- 108 109DefineEngineMethod(ModuleManager, findModule, String, (const char* pModuleId, U32 pVersionId), ("", 0), 110 "Find the specific module Id optionally at the specified version Id.\n" 111 "@param moduleId The module Id to find.\n" 112 "@param versionId The version Id to find.\n" 113 "@return The module definition object or NULL if not found.\n") 114{ 115 // Find module definition. 116 ModuleDefinition* pModuleDefinition = object->findModule(pModuleId, pVersionId); 117 118 // Return nothing if not found. 119 if ( pModuleDefinition == NULL ) 120 return StringTable->EmptyString(); 121 122 return pModuleDefinition->getIdString(); 123} 124 125//----------------------------------------------------------------------------- 126 127DefineEngineMethod(ModuleManager, findModules, String, (bool loadedOnly), (false), 128 "Find all the modules registered with the specified loaded state.\n" 129 "@param loadedOnly Whether to return only modules that are loaded or not.\n" 130 "@return A list of space - separated module definition object Ids.\n") 131{ 132 // Find module type definitions. 133 Vector<const ModuleDefinition*> moduleDefinitions; 134 135 // Find modules. 136 object->findModules( loadedOnly, moduleDefinitions ); 137 138 // Fetch module definition count. 139 const U32 moduleDefinitionCount = (U32)moduleDefinitions.size(); 140 141 // Finish if no module definition were found. 142 if ( moduleDefinitionCount == 0 ) 143 return StringTable->EmptyString(); 144 145 // Create a return buffer. 146 S32 bufferSize = 4096; 147 char* pReturnBuffer = Con::getReturnBuffer( bufferSize ); 148 char* pBufferWrite = pReturnBuffer; 149 150 // Iterate module definitions. 151 for ( ModuleManager::typeConstModuleDefinitionVector::const_iterator moduleDefinitionItr = moduleDefinitions.begin(); moduleDefinitionItr != moduleDefinitions.end(); ++moduleDefinitionItr ) 152 { 153 // Fetch module definition. 154 const ModuleDefinition* pModuleDefinition = *moduleDefinitionItr; 155 156 // Format module definition. 157 const U32 offset = dSprintf( pBufferWrite, bufferSize, "%d ", pModuleDefinition->getId() ); 158 pBufferWrite += offset; 159 bufferSize -= offset; 160 161 // Are we out of buffer space? 162 if ( bufferSize <= 0 ) 163 { 164 // Yes, so warn. 165 Con::warnf( "ModuleManager::findModules() - Ran out of buffer space." ); 166 break; 167 } 168 } 169 170 return pReturnBuffer; 171} 172 173//----------------------------------------------------------------------------- 174 175DefineEngineMethod(ModuleManager, findModuleTypes, String, (const char* pModuleType, bool loadedOnly), ("", false), 176 "Find the modules registered with the specified module type.\n" 177 "@param moduleType The module type to search for.\n" 178 "@param loadedOnly Whether to return only modules that are loaded or not.\n" 179 "@return A list of space - separated module definition object Ids.\n") 180{ 181 // Find module type definitions. 182 Vector<const ModuleDefinition*> moduleDefinitions; 183 184 // Find module types. 185 object->findModuleTypes( pModuleType, loadedOnly, moduleDefinitions ); 186 187 // Fetch module definition count. 188 const U32 moduleDefinitionCount = (U32)moduleDefinitions.size(); 189 190 // Finish if no module definition were found. 191 if ( moduleDefinitionCount == 0 ) 192 return StringTable->EmptyString(); 193 194 // Create a return buffer. 195 S32 bufferSize = 4096; 196 char* pReturnBuffer = Con::getReturnBuffer( bufferSize ); 197 char* pBufferWrite = pReturnBuffer; 198 199 // Iterate module definitions. 200 for ( ModuleManager::typeConstModuleDefinitionVector::const_iterator moduleDefinitionItr = moduleDefinitions.begin(); moduleDefinitionItr != moduleDefinitions.end(); ++moduleDefinitionItr ) 201 { 202 // Fetch module definition. 203 const ModuleDefinition* pModuleDefinition = *moduleDefinitionItr; 204 205 // Format module definition. 206 const U32 offset = dSprintf( pBufferWrite, bufferSize, "%d ", pModuleDefinition->getId() ); 207 pBufferWrite += offset; 208 bufferSize -= offset; 209 210 // Are we out of buffer space? 211 if ( bufferSize <= 0 ) 212 { 213 // Yes, so warn. 214 Con::warnf( "ModuleManager::findTypes() - Ran out of buffer space." ); 215 break; 216 } 217 } 218 219 return pReturnBuffer; 220} 221 222//----------------------------------------------------------------------------- 223 224DefineEngineMethod(ModuleManager, copyModule, String, (const char* sourceModuleDefinition, const char* pTargetModuleId, const char* pTargetPath, const bool useVersionPathing), 225 ("", "", "", false), 226 "Copy the module to a new location with a new module Id.\n" 227 "@param sourceModuleDefinition The module definition to copy.\n" 228 "@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" 229 "@param targetPath The target path to copy the module to.Addition folders will be created depending on whether 'useVersionPathing' is used or not.\n" 230 "@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" 231 "@return The new module definition file if copy was successful or NULL if not.\n") 232{ 233 // Find the source module definition. 234 ModuleDefinition* pSourceModuleDefinition = dynamic_cast<ModuleDefinition*>(Sim::findObject(sourceModuleDefinition)); 235 236 // Was the module definition found? 237 if ( pSourceModuleDefinition == NULL ) 238 { 239 // No, so warn. 240 Con::warnf("ModuleManager::copyModule() - Could not find source module definition '%s'.", sourceModuleDefinition); 241 return ""; 242 } 243 244 // Copy module. 245 return object->copyModule( pSourceModuleDefinition, pTargetModuleId, pTargetPath, useVersionPathing ); 246} 247 248//----------------------------------------------------------------------------- 249 250DefineEngineMethod(ModuleManager, synchronizeDependencies, bool, (const char* rootModuleDefinition, const char* pTargetDependencyFolder), ("", ""), 251 "Synchronize the module dependencies of a module definition to a target dependency folder.\n" 252 "@param rootModuleDefinition The module definition used to determine dependencies.\n" 253 "@param targetDependencyPath The target dependency folder to copy dependencies to.\n" 254 "@return Whether the module dependencies were synchronized correctly or not.\n") 255{ 256 // Find the root module definition. 257 ModuleDefinition* pRootModuleDefinition = dynamic_cast<ModuleDefinition*>(Sim::findObject(rootModuleDefinition)); 258 259 // Was the module definition found? 260 if ( pRootModuleDefinition == NULL ) 261 { 262 // No, so warn. 263 Con::warnf("ModuleManager::synchronizeModules() - Could not find root module definition '%s'.", rootModuleDefinition); 264 return false; 265 } 266 267 // Synchronize dependencies. 268 return object->synchronizeDependencies( pRootModuleDefinition, pTargetDependencyFolder ); 269} 270 271//----------------------------------------------------------------------------- 272 273DefineEngineMethod(ModuleManager, isModuleMergeAvailable, bool, (),, 274 "Checks whether a module merge definition file is available or not.\n" 275 "@return Whether a module merge definition file is available or not.\n") 276{ 277 // Check if module merge is available or not. 278 return object->isModuleMergeAvailable(); 279} 280 281//----------------------------------------------------------------------------- 282 283DefineEngineMethod(ModuleManager, canMergeModules, bool, (const char* mergeSourcePath), (""), 284 "Checks whether a module merge using the modules in the source path can current happen or not.\n" 285 "@param mergeSourcePath The path where modules to be merged are located.\n" 286 "@return Whether a module merge using the modules in the source path can current happen or not.\n") 287{ 288 // Check whether the merge modules can current happen or not. 289 return object->canMergeModules(mergeSourcePath); 290} 291 292//----------------------------------------------------------------------------- 293 294DefineEngineMethod(ModuleManager, mergeModules, bool, (const char* pMergeTargetPath, bool removeMergeDefinition, bool registerNewModules), ("", false, false), 295 "Performs a module merge into the selected target path.\n" 296 "@param mergeTargetPath The path where modules will be merged into.\n" 297 "@param removeMergeDefinition Whether to remove any merge definition found or not if merge is successful.\n" 298 "@param registerNewModules Whether new (not replaced or updated) modules should be registered or not.\n" 299 "@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") 300{ 301 // Merge modules. 302 return object->mergeModules( pMergeTargetPath, removeMergeDefinition, registerNewModules ); 303} 304 305//----------------------------------------------------------------------------- 306 307DefineEngineMethod(ModuleManager, addListener, void, (const char* listenerObject), (""), 308 "Registers the specified object as a listener for module notifications.\n" 309 "@param listenerObject The object to start receiving module notifications.\n" 310 "@return No return value.\n") 311{ 312 // Find object. 313 SimObject* pListener = Sim::findObject(listenerObject); 314 315 // Did we find the listener object? 316 if ( pListener == NULL ) 317 { 318 // No, so warn. 319 Con::warnf("ModuleManager::addNotifications() - Could not find the listener object '%s'.", listenerObject); 320 return; 321 } 322 323 object->addListener( pListener ); 324} 325 326//----------------------------------------------------------------------------- 327 328DefineEngineMethod(ModuleManager, removeListener, void, (const char* listenerObject), (""), 329 "Unregisters the specified object as a listener for module notifications.\n" 330 "@param listenerObject The object to stop receiving module notifications.\n" 331 "@return No return value.\n") 332{ 333 // Find object. 334 SimObject* pListener = Sim::findObject(listenerObject); 335 336 // Did we find the listener object? 337 if ( pListener == NULL ) 338 { 339 // No, so warn. 340 Con::warnf("ModuleManager::removeNotifications() - Could not find the listener object '%s'.", listenerObject); 341 return; 342 } 343 344 object->removeListener( pListener ); 345} 346
