BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BrawlLib.SSBB.StringTable Class Reference
Inheritance diagram for BrawlLib.SSBB.StringTable:

Public Member Functions

void Add (string s)
 
int GetTotalSize ()
 
void Clear ()
 
void WriteTable (VoidPtr address)
 
IEnumerator< string > GetEnumerator ()
 

Properties

VoidPtr this[string s] [get]
 

Member Function Documentation

◆ Add()

void BrawlLib.SSBB.StringTable.Add ( string  s)
inline
14 {
15 if (!string.IsNullOrEmpty(s) && !_table.ContainsKey(s))
16 {
17 _table.Add(s, 0);
18 }
19 }

◆ Clear()

void BrawlLib.SSBB.StringTable.Clear ( )
inline
33 {
34 _table.Clear();
35 }

◆ GetEnumerator()

IEnumerator< string > BrawlLib.SSBB.StringTable.GetEnumerator ( )
inline
63 {
64 return _table.Keys.GetEnumerator();
65 }

◆ GetTotalSize()

int BrawlLib.SSBB.StringTable.GetTotalSize ( )
inline
22 {
23 int len = 0;
24 foreach (string s in _table.Keys)
25 {
26 len += (s.Length + 5).Align(4);
27 }
28
29 return len;
30 }

◆ WriteTable()

void BrawlLib.SSBB.StringTable.WriteTable ( VoidPtr  address)
inline
51 {
52 BRESString* entry = (BRESString*) address;
53 for (int i = 0; i < _table.Count; i++)
54 {
55 string s = _table.Keys[i];
56 _table[s] = entry;
57 entry->Value = s;
58 entry = entry->Next;
59 }
60 }
Definition: BRES.cs:126
string Value
Definition: BRES.cs:146
BRESString * Next
Definition: BRES.cs:168

Property Documentation

◆ this[string s]

VoidPtr BrawlLib.SSBB.StringTable.this[string s]
get
38 {
39 get
40 {
41 if (!string.IsNullOrEmpty(s) && _table.ContainsKey(s))
42 {
43 return _table[s];
44 }
45
46 return _table.Values[0];
47 }
48 }

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