Class Index | File Index

Classes


Class Module


Version 1.0.
Module
Defined in: Hydra.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Module()
Module is the class that will manage the module system.
Field Summary
Field Attributes Field Name and Description
 
type is a property to be able to know the class type.
Method Summary
Method Attributes Method Name and Description
<private>  
_delete(sModuleId)
_delete is a wrapper method that will call the native delete javascript function It's important to test the full code.
 
extend(sModuleId, fpCreator)
extend is the method that will be used to extend a module with new features.
<private>  
merge(oModuleBase, oModuleExtended)
merge is a method to merge two modules in a new one.
 
register(sModuleId, fpCreator)
register is the method that will add the new module to the oModules object.
 
remove(sModuleId)
remove is the method that will remove the full module from the oModules object
 
start(sModuleId, oData)
start is the method that will initialize the module.
 
startAll is the method that will initialize all the registered modules.
 
stop(sModuleId)
stop is the method that will finish the module if it was registered and started.
 
stopAll is the method that will finish all the registered and started modules.
 
test(sModuleId, fpCallback)
test is a method that will return the module without wrapping their methods.
Class Detail
Module()
Module is the class that will manage the module system.
Author: Tomas Corral Casas.
Field Detail
{String} type
type is a property to be able to know the class type.
Author: Tomas Corral Casas.
Method Detail
<private> _delete(sModuleId)
_delete is a wrapper method that will call the native delete javascript function It's important to test the full code.
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId

extend(sModuleId, fpCreator)
extend is the method that will be used to extend a module with new features. can be used to remove some features too, withou touching the original code.
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId
{Function} fpCreator

<private> {Object} merge(oModuleBase, oModuleExtended)
merge is a method to merge two modules in a new one. This must be called only from the extend public method.
Author: Tomas Corral Casas.
Parameters:
{Object} oModuleBase
{Object} oModuleExtended
Returns:
{Object} the merged module

register(sModuleId, fpCreator)
register is the method that will add the new module to the oModules object. sModuleId will be the key where it will be stored.
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId
{Function} fpCreator

remove(sModuleId)
remove is the method that will remove the full module from the oModules object
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId

start(sModuleId, oData)
start is the method that will initialize the module. When start is called the module instance will be created and the init method is called.
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId
{Object} oData

startAll()
startAll is the method that will initialize all the registered modules.
Author: Tomas Corral Casas.

stop(sModuleId)
stop is the method that will finish the module if it was registered and started. When stop is called the module will call the destroy method and will nullify the instance.
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId

stopAll()
stopAll is the method that will finish all the registered and started modules.
Author: Tomas Corral Casas.

test(sModuleId, fpCallback)
test is a method that will return the module without wrapping their methods. It's called test because it was created to be able to test the modules with unit testing.
Author: Tomas Corral Casas.
Parameters:
{String} sModuleId
{Function} fpCallback

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Jul 16 2011 19:06:22 GMT+0200 (CEST)