PixelCrushers.StringField Class Reference

A StringField is an object that can refer to a string, StringAsset, or field in a TextTable. More...

Inheritance diagram for PixelCrushers.StringField:
Collaboration diagram for PixelCrushers.StringField:

Public Member Functions

override string ToString ()
 
 StringField ()
 
 StringField (string text)
 
 StringField (StringAsset stringAsset)
 
 StringField (TextTable textTable, int fieldID)
 
 StringField (StringField source)
 
void SetDefaultTextTable (TextTable textTable)
 
bool Equals (StringField other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Static Public Member Functions

static bool operator== (StringField obj1, StringField obj2)
 
static bool operator!= (StringField obj1, StringField obj2)
 
static bool IsNullOrEmpty (StringField stringField)
 Similar to string.IsNullOrEmpty.
 
static string GetStringValue (StringField stringField)
 Returns the string value of a StringField.
 

Static Public Attributes

static readonly StringField empty = new StringField()
 An empty StringField, similar to string.Empty.
 

Properties

string text [get, set]
 The string that holds the value of this string field.
 
StringAsset stringAsset [get, set]
 The String Asset that holds the value of this string field.
 
TextTable textTable [get, set]
 The Text Table that holds the value of this string field.
 
int textTableFieldID [get, set]
 The field ID in the Text Table.
 
string value [get, set]
 Gets or sets the value of the String Field.
 

Detailed Description

A StringField is an object that can refer to a string, StringAsset, or field in a TextTable.

Constructor & Destructor Documentation

◆ StringField() [1/5]

PixelCrushers.StringField.StringField ( )
inline

◆ StringField() [2/5]

PixelCrushers.StringField.StringField ( string  text)
inline

◆ StringField() [3/5]

PixelCrushers.StringField.StringField ( StringAsset  stringAsset)
inline

◆ StringField() [4/5]

PixelCrushers.StringField.StringField ( TextTable  textTable,
int  fieldID 
)
inline

◆ StringField() [5/5]

PixelCrushers.StringField.StringField ( StringField  source)
inline

Member Function Documentation

◆ Equals() [1/2]

override bool PixelCrushers.StringField.Equals ( object  obj)
inline

◆ Equals() [2/2]

bool PixelCrushers.StringField.Equals ( StringField  other)
inline

◆ GetHashCode()

override int PixelCrushers.StringField.GetHashCode ( )
inline

◆ GetStringValue()

static string PixelCrushers.StringField.GetStringValue ( StringField  stringField)
inlinestatic

Returns the string value of a StringField.

This function is null safe. If the StringField parameter is null, it returns an empty string.

Parameters
stringFieldThe StringField whose value to return.
Returns
The string value.

◆ IsNullOrEmpty()

static bool PixelCrushers.StringField.IsNullOrEmpty ( StringField  stringField)
inlinestatic

Similar to string.IsNullOrEmpty.

Parameters
stringFieldThe StringField to check.
Returns
true if the StringField is null or empty; otherwise false.

◆ operator!=()

static bool PixelCrushers.StringField.operator!= ( StringField  obj1,
StringField  obj2 
)
inlinestatic

◆ operator==()

static bool PixelCrushers.StringField.operator== ( StringField  obj1,
StringField  obj2 
)
inlinestatic

◆ SetDefaultTextTable()

void PixelCrushers.StringField.SetDefaultTextTable ( TextTable  textTable)
inline

◆ ToString()

override string PixelCrushers.StringField.ToString ( )
inline

Member Data Documentation

◆ empty

readonly StringField PixelCrushers.StringField.empty = new StringField()
static

An empty StringField, similar to string.Empty.

Property Documentation

◆ stringAsset

StringAsset PixelCrushers.StringField.stringAsset
getset

The String Asset that holds the value of this string field.

Unused if Text or Text Table is assigned.

◆ text

string PixelCrushers.StringField.text
getset

The string that holds the value of this string field.

Unused if String Asset or Text Table is assigned.

◆ textTable

TextTable PixelCrushers.StringField.textTable
getset

The Text Table that holds the value of this string field.

Unused if Text or String Asset is assigned.

◆ textTableFieldID

int PixelCrushers.StringField.textTableFieldID
getset

The field ID in the Text Table.

◆ value

string PixelCrushers.StringField.value
getset

Gets or sets the value of the String Field.

If setting, you can only set the text; this property doesn't change String Assets or Text Tables.


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