Main source file.
| SamHaXe.hx | Main source file. |
| ModuleHelpPars | Container for module help parameters. |
| Variables | |
| module | Name of module. |
| if_version | Requested interface version. |
| flash_version | Requested flash version. |
| Options | Container for parsed command line options. |
| Variables | |
| help | Specifies if help message should be printed |
| configfile | Specifies the config file to use |
| depfile | Name of dependency tracking file or null if no dependency tracking requested. |
| modopts | Options passed to import modules. |
| modlist | Specifies if module list should be printed. |
| modhelp | Stores the list of modules and the associated flash version whose detailed help message will be printed. |
| SamHaXe | Main application class |
| variables | |
| supported_interface_versions | List of supported module interface versions. |
| methods | |
| new | Does all the work right now. |
| runImport | Invokes the import mechanism of the module associated with the asset. |
| getModuleService | Returns an instance of requested version of module service. |
| IdRegistry interface methods | |
| idExists | See IdRegistry.idExists |
| getNewId | See IdRegistry.getNewId |
| getIdForHash | See IdRegistry.getIdForHash |
| SymbolRegistry interface methods | |
| symbolExists | See SymbolRegistry.symbolExists |
| addSymbol | See SymbolRegistry.addSymbol |
| getSymbolCid | See SymbolRegistry.getSymbolCid |
| getCidSymbol | See SymbolRegistry.getCidSymbol |
| AS3Registry interface methods | |
| getContext | See AS3Registry.getContext |
| DependencyRegistry interface methods | |
| addFilePath | See DependencyRegistry.addFilePath |
| VariableRegistry interface methods | |
| getVariable | See VariableRegistry.getVariable |
| setVariable | See VariableRegistry.setVariable |
| Custom option parsing methods | |
| writerModuleOptions | Module option writer used by Optparse. |
| writerModuleHelp | Module help option writer used by Optparse. |
| main | |
| main | Application’s main entry point. |
Container for module help parameters.
| Variables | |
| module | Name of module. |
| if_version | Requested interface version. |
| flash_version | Requested flash version. |
Container for parsed command line options.
| Variables | |
| help | Specifies if help message should be printed |
| configfile | Specifies the config file to use |
| depfile | Name of dependency tracking file or null if no dependency tracking requested. |
| modopts | Options passed to import modules. |
| modlist | Specifies if module list should be printed. |
| modhelp | Stores the list of modules and the associated flash version whose detailed help message will be printed. |
Main application class
static inline var supported_interface_versions
List of supported module interface versions.
Currently there’s only one module interface version (1.0) but in the future more versions might be added whose member functions may differ in parametrisation name, etc. The version “1.1” is added only for test purposes. Compose.hx module uses module interface version “1.1” to demonstrate supporting two interface simultaneously. This list contains all of those versions which the current implementation can handle.
static function writerModuleOptions( options: Dynamic, field: String, value: Dynamic )
Module option writer used by Optparse.
Stores options specified by command line options -m, --module-options.
static function writerModuleHelp( options: Dynamic, field: String, value: Array<{key: String, value: String}> )
Module help option writer used by Optparse.
Stores options specified by command line option --module-help.
Name of module.
module: String
Requested interface version.
if_version: String
Requested flash version.
flash_version: Int
Specifies if help message should be printed
help: Bool
Specifies the config file to use
configfile: String
Name of dependency tracking file or null if no dependency tracking requested.
depfile: String
Options passed to import modules.
modopts: Hash<Hash<String>>
Specifies if module list should be printed.
modlist: Bool
Stores the list of modules and the associated flash version whose detailed help message will be printed.
modhelp: Array<ModuleHelpPars>
List of supported module interface versions.
static inline var supported_interface_versions
Does all the work right now.
public function new()
Invokes the import mechanism of the module associated with the asset.
public function runImport( asset: NsFastXml ) : Array<SWFTag>
Returns an instance of requested version of module service.
public function getModuleService( if_version : String ) : Dynamic
See IdRegistry.idExists
public function idExists( id: Int ): Bool
Checks whether a given character ID has already been defined.
public function idExists( id: Int ): Bool
See IdRegistry.getNewId
public function getNewId(): Int
Queries a new characterd ID guaranteed to be unique.
public function getNewId(): Int
See IdRegistry.getIdForHash
public function getIdForHash( md5: String, tagId: Int ) : BytesIdLookupResult
Checks and returns if a character ID was already assigned for the given hashed data of the given tag type, or a new unique id if not found.
public function getIdForHash( md5: String, tagId: Int ): BytesIdLookupResult
See SymbolRegistry.symbolExists
public function symbolExists( symbol: String ): Bool
Check if a given symbol exists in the registry.
function symbolExists( symbol: String ): Bool
See SymbolRegistry.addSymbol
public function addSymbol( cid: Int, symbol: String, ?store = true ): Void
Adds a symbol to the registry.
function addSymbol( cid: Int, symbol: String, ?store : Bool = true ): Void
See SymbolRegistry.getSymbolCid
public function getSymbolCid( symbol: String ): Int
Returns the character ID for a symbol.
function getSymbolCid( symbol: String ): Int
See SymbolRegistry.getCidSymbol
public function getCidSymbol( cid: Int ): Null<String>
Returns the symbol name for a character ID.
function getCidSymbol( cid: Int ): Null<String>
See AS3Registry.getContext
public function getContext(): format.abc.Context
Returns the AS3 context for the actual frame.
function getContext(): format.abc.Context
See DependencyRegistry.addFilePath
public function addFilePath( p: String ): Void
Adds a new file to the dependency list.
function addFilePath( p: String ): Void
See VariableRegistry.getVariable
public function getVariable( name: String ): Dynamic
Retrieves the vaule of a variable.
function getVariable( name: String ): Dynamic
See VariableRegistry.setVariable
public function setVariable( name: String, value: Dynamic ): Void
Sets the vaule of a variable.
function setVariable( name: String, value: Dynamic ): Void
Module option writer used by Optparse.
static function writerModuleOptions( options: Dynamic, field: String, value: Dynamic )
Module help option writer used by Optparse.
static function writerModuleHelp( options: Dynamic, field: String, value: Array<{key: String, value: String}> )
Application’s main entry point.
public static function main()