IdRegistry.hx

Summary
IdRegistry.hx
IdRegistryKeeps track of character IDs requested by import functions.
Functions
idExistsChecks whether a given character ID has already been defined.
getNewIdQueries a new characterd ID guaranteed to be unique.
getIdForHashChecks 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.

IdRegistry

Keeps track of character IDs requested by import functions.

Summary
Functions
idExistsChecks whether a given character ID has already been defined.
getNewIdQueries a new characterd ID guaranteed to be unique.
getIdForHashChecks 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.

Functions

idExists

public function idExists(id: Int): Bool

Checks whether a given character ID has already been defined.

Parameters

idthe character ID

Returns

true if the ID has already been defined, false otherwise.

getNewId

public function getNewId(): Int

Queries a new characterd ID guaranteed to be unique.

Returns

The new character ID.

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.

Note: the md5 hash should include all relevant data bytes

Parameters

md5the MD5 hash of data bytes
tagIdformat.swf.TagId of resource type, to avoid Binary vs.  Sound collisions etc.

Returns

The character ID, wrapped in BytesIdLookupResult according to whether the requested hash was found or not.

public function idExists(id: Int): Bool
Checks whether a given character ID has already been defined.
public function getNewId(): Int
Queries a new characterd ID guaranteed to be unique.
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.
Close