Import module proxy.
| SamHaXeModule.hx | Import module proxy. |
| Types | |
| ImportFunction | Prototype of an import function. |
| CheckFunction | Prototype of an asset check function. |
| HelpFunction | Prototype of a help function. |
| SamHaXeModule | Wrapper class around an import module. |
| Interface independent exports | |
| INTERFACES | Name of array variable of supported interface versions. |
| DESCRIPTION | Name of string variable of short module description. |
| INIT_MODULE | Name of module initializatoon function. |
| Interface dependent exports | |
| IMPORT_FUN_1_0 | Name of asset importing function in module interface version 1.0. |
| CHECK_FUN_1_0 | Name of XML node checking function in module interface version 1.0. |
| HELP_FUN_1_0 | Name of module help function in module interface version 1.0. |
| genclass attribute constants | |
| GENCLASS_FALSE | Don’t generate neither symbol class nor AS3 class stub. |
| GENCLASS_SYMBOL_ONLY | Generate only symbol class. |
| GENCLASS_SYMBOL_AND_CLASS | Generate symbol class and AS3 class stub. |
| Interface independent members and methods | |
| new | Constructor |
| isCompatibleVersion | Checks if the given module interface version is compatible with the requested. |
| getCompatibleVersion | Looks up the module interface of highest possible version constrained by the required version and the interface versions supported by SamHaXe. |
| init | Initializes the module by selecting and exposing a compatible module interface. |
| getDescription | the short description of the module |
| getImportFunction | the import function for handling xml fragments |
| getCheckFunction | the check function for validating xml fragments, or null if such function is not exported |
| getHelpFunction | the help function for displaying module-specific help message, or null if such function is not exported |
Wrapper class around an import module.
| Interface independent exports | |
| INTERFACES | Name of array variable of supported interface versions. |
| DESCRIPTION | Name of string variable of short module description. |
| INIT_MODULE | Name of module initializatoon function. |
| Interface dependent exports | |
| IMPORT_FUN_1_0 | Name of asset importing function in module interface version 1.0. |
| CHECK_FUN_1_0 | Name of XML node checking function in module interface version 1.0. |
| HELP_FUN_1_0 | Name of module help function in module interface version 1.0. |
| genclass attribute constants | |
| GENCLASS_FALSE | Don’t generate neither symbol class nor AS3 class stub. |
| GENCLASS_SYMBOL_ONLY | Generate only symbol class. |
| GENCLASS_SYMBOL_AND_CLASS | Generate symbol class and AS3 class stub. |
| Interface independent members and methods | |
| new | Constructor |
| isCompatibleVersion | Checks if the given module interface version is compatible with the requested. |
| getCompatibleVersion | Looks up the module interface of highest possible version constrained by the required version and the interface versions supported by SamHaXe. |
| init | Initializes the module by selecting and exposing a compatible module interface. |
| getDescription | the short description of the module |
| getImportFunction | the import function for handling xml fragments |
| getCheckFunction | the check function for validating xml fragments, or null if such function is not exported |
| getHelpFunction | the help function for displaying module-specific help message, or null if such function is not exported |
public function isCompatibleVersion( version: String, req_version: String ): Bool
Checks if the given module interface version is compatible with the requested. The interface version is expected to be in Major.Minor.Bugfix format, while the requested version may omit the bugfix or the minor and bugfix levels - in these cases the corrseponding levels are not checked. All checked levels have to match in order the test to pass.
| version | the interface version in Major.Minor.Bugfix format |
| req_version | the interface version requested by the resource xml file, in Major[.Minor[.Bugfix]] format |
the result of the compatibility test
public function getCompatibleVersion( supported_versions: Array<String>, required_version: String ): String
Looks up the module interface of highest possible version constrained by the required version and the interface versions supported by SamHaXe.
Omitting version levels means that getCompatibleVersion is free to choose any version for the given levels.
| supported_versions | interface versions supported by SamHaXe in Major[.Minor[.Bugfix]] format |
| required_version | the interface version requested by the resource xml file, in Major[.Minor[.Bugfix]] format |
the chosen version string
public function init( supported_versions: Array<String>, required_version: String, moduleServices : String -> Dynamic )
Initializes the module by selecting and exposing a compatible module interface. See getCompatibleVersion for interface selection details.
| supported_versions | interface versions supported by SamHaXe in Major[.Minor[.Bugfix]] format |
| required_version | the interface version requested by the resource xml file, in Major[.Minor[.Bugfix]] format |
| moduleServices | function to request the Module Services interface for a given interface version. See SamHaXe::getModuleService. |
Name of array variable of supported interface versions.
public inline static var INTERFACES
Name of string variable of short module description.
public inline static var DESCRIPTION
Name of module initializatoon function.
public inline static var INIT_MODULE
Name of asset importing function in module interface version 1.0.
public inline static var IMPORT_FUN_1_0
Name of XML node checking function in module interface version 1.0.
public inline static var CHECK_FUN_1_0
Name of module help function in module interface version 1.0.
public inline static var HELP_FUN_1_0
Don’t generate neither symbol class nor AS3 class stub.
public inline static var GENCLASS_FALSE
Generate only symbol class.
public inline static var GENCLASS_SYMBOL_ONLY
Generate symbol class and AS3 class stub.
public inline static var GENCLASS_SYMBOL_AND_CLASS
Constructor
public function new( module_name: String, uri: String )
Checks if the given module interface version is compatible with the requested.
public function isCompatibleVersion( version: String, req_version: String ): Bool
Looks up the module interface of highest possible version constrained by the required version and the interface versions supported by SamHaXe.
public function getCompatibleVersion( supported_versions: Array<String>, required_version: String ): String
Initializes the module by selecting and exposing a compatible module interface.
public function init( supported_versions: Array<String>, required_version: String, moduleServices : String -> Dynamic )
the short description of the module
public function getDescription(): String
the import function for handling xml fragments
public function getImportFunction(): ImportFunction
the check function for validating xml fragments, or null if such function is not exported
public function getCheckFunction(): CheckFunction
the help function for displaying module-specific help message, or null if such function is not exported
public function getHelpFunction(): HelpFunction
Returns an instance of requested version of module service.
public function getModuleService( if_version : String ) : Dynamic