C# Class TagTool.Cache.StringIDCache

A file containing a cache of all of the stringID strings.
Datei anzeigen Open project: TheGuardians/TagTool Class Usage Examples

Public Methods

Method Description
Add ( string str ) : StringID

Adds a string to the cache.

GetString ( StringID stringId ) : string

Gets the string corresponding to a stringID.

GetStringID ( int strIndex ) : StringID

Gets the stringID corresponding to a string list index.

GetStringID ( string str ) : StringID

Gets the stringID corresponding to a string in the list.

Save ( Stream stream ) : void

Saves the string data back to the file.

StringIDCache ( Stream stream, StringIDResolverBase resolver ) : System

Loads a stringID cache from a string_ids.dat file.

Private Methods

Method Description
Load ( Stream stream ) : void

Loads the cache from a stream.

Method Details

Add() public method

Adds a string to the cache.
public Add ( string str ) : StringID
str string The string to add.
return StringID

GetString() public method

Gets the string corresponding to a stringID.
public GetString ( StringID stringId ) : string
stringId StringID The stringID.
return string

GetStringID() public method

Gets the stringID corresponding to a string list index.
public GetStringID ( int strIndex ) : StringID
strIndex int The string list index to convert.
return StringID

GetStringID() public method

Gets the stringID corresponding to a string in the list.
public GetStringID ( string str ) : StringID
str string The string to search for.
return StringID

Save() public method

Saves the string data back to the file.
public Save ( Stream stream ) : void
stream Stream The stream to write to.
return void

StringIDCache() public method

Loads a stringID cache from a string_ids.dat file.
public StringIDCache ( Stream stream, StringIDResolverBase resolver ) : System
stream Stream The stream to read from.
resolver StringIDResolverBase The stringID resolver to use.
return System