Semi Mod Loader
Classes | Public Member Functions | Static Public Member Functions | List of all members
Semi.IDMapParser< T, TTag > Class Template Reference

Classes

class  IDMapFormatException
 

Public Member Functions

delegate T AcquireItem (string id)
 Defines how to acquire the item based on the ID in string format. More...
 
delegate void DoAfterAcquiredItem (string strid, T item)
 Defines what to do with the item once it's been acquired, before registering it to the IDPool. More...
 

Static Public Member Functions

static IDPool< T, TTag > Parse (StreamReader file, string nspace, AcquireItem callback, bool percent_space_escape=true, DoAfterAcquiredItem do_after=null)
 Parses a file in Semi IDMap format. More...
 

Member Function Documentation

◆ AcquireItem()

delegate T Semi.IDMapParser< T, TTag >.AcquireItem ( string  id)

Defines how to acquire the item based on the ID in string format.

◆ DoAfterAcquiredItem()

delegate void Semi.IDMapParser< T, TTag >.DoAfterAcquiredItem ( string  strid,
item 
)

Defines what to do with the item once it's been acquired, before registering it to the IDPool.

◆ Parse()

static IDPool<T, TTag> Semi.IDMapParser< T, TTag >.Parse ( StreamReader  file,
string  nspace,
AcquireItem  callback,
bool  percent_space_escape = true,
DoAfterAcquiredItem  do_after = null 
)
inlinestatic

Parses a file in Semi IDMap format.

Returns
A new IDPool containing all the specified objects.
Parameters
fileIDMap file.
nspaceNamespace to assign to all the entries.
callbackAcquireItem
percent_space_escapeIf set to true, triple percent signs will be replaced with single spaces in source IDs.
do_afterDoAfterAcquiredItem

The documentation for this class was generated from the following file: