C# Class FSO.Files.Formats.IFF.Chunks.STR

This chunk type holds text strings. The first two bytes correspond to the format code, of which there are four types. Some chunks in the game do not specify any data after the version number, so be sure to implement bounds checking.
Inheritance: IffChunk
显示文件 Open project: RHY3756547/FreeSO Class Usage Examples

Public Properties

Property Type Description
DefaultLangCode STRLangCode
LanguageSetNames string[]
LanguageSets FSO.Files.Formats.IFF.Chunks.STRLanguageSet[]

Public Methods

Method Description
GetLanguageSet ( STRLangCode set ) : STRLanguageSet
GetString ( int index ) : string

Gets a string from this chunk.

GetString ( int index, STRLangCode language ) : string
GetStringEntry ( int index ) : STRItem

Gets a STRItem instance from this STR chunk.

GetStringEntry ( int index, STRLangCode language ) : STRItem
InitLanguageSet ( STRLangCode set ) : void
InsertString ( int index, STRItem item ) : void
IsSetInit ( STRLangCode set ) : bool
Read ( IffFile iff, Stream stream ) : void

Reads a STR chunk from a stream.

RemoveString ( int index ) : void
STR ( ) : System
SetString ( int index, string value ) : void
SetString ( int index, string value, STRLangCode language ) : void
SwapString ( int srcindex, int dstindex ) : void
Write ( IffFile iff, Stream stream ) : bool

Method Details

GetLanguageSet() public method

public GetLanguageSet ( STRLangCode set ) : STRLanguageSet
set STRLangCode
return STRLanguageSet

GetString() public method

Gets a string from this chunk.
public GetString ( int index ) : string
index int Index of string.
return string

GetString() public method

public GetString ( int index, STRLangCode language ) : string
index int
language STRLangCode
return string

GetStringEntry() public method

Gets a STRItem instance from this STR chunk.
public GetStringEntry ( int index ) : STRItem
index int Index of STRItem.
return STRItem

GetStringEntry() public method

public GetStringEntry ( int index, STRLangCode language ) : STRItem
index int
language STRLangCode
return STRItem

InitLanguageSet() public method

public InitLanguageSet ( STRLangCode set ) : void
set STRLangCode
return void

InsertString() public method

public InsertString ( int index, STRItem item ) : void
index int
item STRItem
return void

IsSetInit() public method

public IsSetInit ( STRLangCode set ) : bool
set STRLangCode
return bool

Read() public method

Reads a STR chunk from a stream.
public Read ( IffFile iff, Stream stream ) : void
iff IffFile An Iff instance.
stream Stream A Stream object holding a STR chunk.
return void

RemoveString() public method

public RemoveString ( int index ) : void
index int
return void

STR() public method

public STR ( ) : System
return System

SetString() public method

public SetString ( int index, string value ) : void
index int
value string
return void

SetString() public method

public SetString ( int index, string value, STRLangCode language ) : void
index int
value string
language STRLangCode
return void

SwapString() public method

public SwapString ( int srcindex, int dstindex ) : void
srcindex int
dstindex int
return void

Write() public method

public Write ( IffFile iff, Stream stream ) : bool
iff IffFile
stream Stream
return bool

Property Details

DefaultLangCode public_oe static_oe property

public static STRLangCode DefaultLangCode
return STRLangCode

LanguageSetNames public_oe static_oe property

public static string[] LanguageSetNames
return string[]

LanguageSets public_oe property

public STRLanguageSet[],FSO.Files.Formats.IFF.Chunks LanguageSets
return FSO.Files.Formats.IFF.Chunks.STRLanguageSet[]