SamHaXe.hx

Main source file.

Summary
SamHaXe.hxMain source file.
ModuleHelpParsContainer for module help parameters.
Variables
moduleName of module.
if_versionRequested interface version.
flash_versionRequested flash version.
OptionsContainer for parsed command line options.
Variables
helpSpecifies if help message should be printed
configfileSpecifies the config file to use
depfileName of dependency tracking file or null if no dependency tracking requested.
modoptsOptions passed to import modules.
modlistSpecifies if module list should be printed.
modhelpStores the list of modules and the associated flash version whose detailed help message will be printed.
SamHaXeMain application class
variables
supported_interface_versionsList of supported module interface versions.
methods
newDoes all the work right now.
runImportInvokes the import mechanism of the module associated with the asset.
getModuleServiceReturns an instance of requested version of module service.
IdRegistry interface methods
idExistsSee IdRegistry.idExists
getNewIdSee IdRegistry.getNewId
getIdForHashSee IdRegistry.getIdForHash
SymbolRegistry interface methods
symbolExistsSee SymbolRegistry.symbolExists
addSymbolSee SymbolRegistry.addSymbol
getSymbolCidSee SymbolRegistry.getSymbolCid
getCidSymbolSee SymbolRegistry.getCidSymbol
AS3Registry interface methods
getContextSee AS3Registry.getContext
DependencyRegistry interface methods
addFilePathSee DependencyRegistry.addFilePath
VariableRegistry interface methods
getVariableSee VariableRegistry.getVariable
setVariableSee VariableRegistry.setVariable
Custom option parsing methods
writerModuleOptionsModule option writer used by Optparse.
writerModuleHelpModule help option writer used by Optparse.
main
mainApplication’s main entry point.

ModuleHelpPars

Container for module help parameters.

Summary
Variables
moduleName of module.
if_versionRequested interface version.
flash_versionRequested flash version.

Variables

module

module: String

Name of module.

if_version

if_version: String

Requested interface version.

flash_version

flash_version: Int

Requested flash version.

Options

Container for parsed command line options.

Summary
Variables
helpSpecifies if help message should be printed
configfileSpecifies the config file to use
depfileName of dependency tracking file or null if no dependency tracking requested.
modoptsOptions passed to import modules.
modlistSpecifies if module list should be printed.
modhelpStores the list of modules and the associated flash version whose detailed help message will be printed.

Variables

help

help: Bool

Specifies if help message should be printed

Related command line options

  • -h
  • --help

configfile

configfile: String

Specifies the config file to use

Related command line options

  • -c
  • --config

depfile

depfile: String

Name of dependency tracking file or null if no dependency tracking requested.

Related command line options

  • -d
  • --depfile

modopts

modopts: Hash<Hash<String>>

Options passed to import modules.

Related command line options

  • -m
  • --module-options

modlist

modlist: Bool

Specifies if module list should be printed.

Related command line options

  • -l
  • --module-list

modhelp

modhelp: Array<ModuleHelpPars>

Stores the list of modules and the associated flash version whose detailed help message will be printed.

Related command line options

  • --module-help

variables

supported_interface_versions

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.

methods

new

public function new()

Does all the work right now.

runImport

public function runImport(asset: NsFastXml) : Array<SWFTag>

Invokes the import mechanism of the module associated with the asset.  This involves registering Id’s and AS3 code.

Parameters

assetthe asset to be imported

Returns

the swf taglist of the asset

getModuleService

public function getModuleService(if_version String) : Dynamic

Returns an instance of requested version of module service.

Parameters

if_versionthe module interface version requested

Returns

The module service instance.

IdRegistry interface methods

idExists

public function idExists(id: Int): Bool

See IdRegistry.idExists

getNewId

public function getNewId(): Int

See IdRegistry.getNewId

getIdForHash

public function getIdForHash(md5: String,
tagId: Int) : BytesIdLookupResult

See IdRegistry.getIdForHash

SymbolRegistry interface methods

symbolExists

public function symbolExists(symbol: String): Bool

See SymbolRegistry.symbolExists

addSymbol

public function addSymbol(cid: Int,  
symbol: String,  
 ?store =  true): Void

See SymbolRegistry.addSymbol

getSymbolCid

public function getSymbolCid(symbol: String): Int

See SymbolRegistry.getSymbolCid

getCidSymbol

public function getCidSymbol(cid: Int): Null<String>

See SymbolRegistry.getCidSymbol

AS3Registry interface methods

getContext

public function getContext(): format.abc.Context

See AS3Registry.getContext

DependencyRegistry interface methods

addFilePath

public function addFilePath(p: String): Void

See DependencyRegistry.addFilePath

VariableRegistry interface methods

getVariable

public function getVariable(name: String): Dynamic

See VariableRegistry.getVariable

setVariable

public function setVariable(name: String,
value: Dynamic): Void

See VariableRegistry.setVariable

Custom option parsing methods

writerModuleOptions

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.

writerModuleHelp

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.

main

main

public static function main()

Application’s main entry point.

module: String
Name of module.
if_version: String
Requested interface version.
flash_version: Int
Requested flash version.
help: Bool
Specifies if help message should be printed
configfile: String
Specifies the config file to use
depfile: String
Name of dependency tracking file or null if no dependency tracking requested.
modopts: Hash<Hash<String>>
Options passed to import modules.
modlist: Bool
Specifies if module list should be printed.
modhelp: Array<ModuleHelpPars>
Stores the list of modules and the associated flash version whose detailed help message will be printed.
static inline var supported_interface_versions
List of supported module interface versions.
public function new()
Does all the work right now.
public function runImport(asset: NsFastXml) : Array<SWFTag>
Invokes the import mechanism of the module associated with the asset.
public function getModuleService(if_version String) : Dynamic
Returns an instance of requested version of module service.
public function idExists(id: Int): Bool
See IdRegistry.idExists
public function idExists(id: Int): Bool
Checks whether a given character ID has already been defined.
public function getNewId(): Int
See IdRegistry.getNewId
public function getNewId(): Int
Queries a new characterd ID guaranteed to be unique.
public function getIdForHash(md5: String,
tagId: Int) : BytesIdLookupResult
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 symbolExists(symbol: String): Bool
See SymbolRegistry.symbolExists
function symbolExists(symbol: String): Bool
Check if a given symbol exists in the registry.
public function addSymbol(cid: Int,  
symbol: String,  
 ?store =  true): Void
See SymbolRegistry.addSymbol
function addSymbol(cid: Int,  
symbol: String,  
?store Bool =  true): Void
Adds a symbol to the registry.
public function getSymbolCid(symbol: String): Int
See SymbolRegistry.getSymbolCid
function getSymbolCid(symbol: String): Int
Returns the character ID for a symbol.
public function getCidSymbol(cid: Int): Null<String>
See SymbolRegistry.getCidSymbol
function getCidSymbol(cid: Int): Null<String>
Returns the symbol name for a character ID.
public function getContext(): format.abc.Context
See AS3Registry.getContext
function getContext(): format.abc.Context
Returns the AS3 context for the actual frame.
public function addFilePath(p: String): Void
See DependencyRegistry.addFilePath
function addFilePath(p: String): Void
Adds a new file to the dependency list.
public function getVariable(name: String): Dynamic
See VariableRegistry.getVariable
function getVariable(name: String): Dynamic
Retrieves the vaule of a variable.
public function setVariable(name: String,
value: Dynamic): Void
See VariableRegistry.setVariable
function setVariable(name: String,
value: Dynamic): Void
Sets the vaule of a variable.
static function writerModuleOptions(options: Dynamic,
field: String,
value: Dynamic)
Module option writer used by Optparse.
Command line argument parsing class.
static function writerModuleHelp(options: Dynamic,
field: String,
value: Array<{key: String, value: String}>)
Module help option writer used by Optparse.
public static function main()
Application’s main entry point.
Keeps track of character IDs requested by import functions.
Keeps track of symbol class names generated by import modules.
Keeps track of class stubs generated by import functions.
Keeps track of file dependencies of the actual asset library.
Keeps track of variables shared between import modules.
Compose tutorial import module for demonstrating the use of other import modules from a module.
Close