This reference page is linked to from the following overview topics: Instancing a Referenced Object, MotionBuilder 2014.
#include <fbstring.h>
String list.
Definition at line 201 of file fbstring.h.
Public Member Functions |
|
FBStringList () | |
Constructor. |
|
FBStringList (const char *pString, const char pSeparator= '~') | |
Constructor. |
|
FBStringList (const FBStringList &pOther) | |
Copy constructor. |
|
FBStringList & | operator= (const FBStringList &pOther) |
Overload assignment operator to support deep
copy. |
|
~FBStringList () | |
Destructor. |
|
KStringList * | GetInternal () const |
Get internal variable. |
|
kReference | GetReferenceAt (int pIndex) const |
Get the reference store with the string at
pIndex. |
|
void | SetReferenceAt (int pIndex, kReference pRef) |
Set the reference stored with the string at
pIndex. |
|
int | Find (kReference pRef) const |
Find the index where pRef is
stored. |
|
int | Find (const char *pString, bool pCaseSensitive=true, bool pStartWith=false) const |
Find the index with the string
pString (or start with pString) |
|
const char * | GetAt (int pIndex) const |
Get the string at pIndex. |
|
const char * | operator[] (int pIndex) const |
Overloaded [] operator. |
|
void | Sort () |
Sort the string list (ascending) |
|
int | GetCount () const |
Get the number of items in the list.
|
|
int | Remove (const char *S) |
Remove a string from the list. |
|
const char * | AsString (const char pSeparator= '~') const |
Get as string. |
|
bool | SetString (const char *pString, const char pSeparator= '~') |
Set string for list. |
|
int | Add (const char *S, kReference pRef=0) |
Add a string to the list. |
|
void | Clear () |
Clear the list (remove all the items).
|
|
void | RemoveAt (int pIndex) |
Remove an entry at pIndex. |
|
int | IndexOf (const char *S) const |
Get the index of a string. |
|
void | InsertAt (int pIndex, const char *S, kReference pRef=0) |
Insert an entry at pIndex. |
|
bool | SetAt (int pIndex, const char *pString) |
Set the string at pIndex. |
|
Protected Attributes |
|
KStringList * | mItems |
Internal use only - List of items. |
FBStringList::FBStringList | ( | ) |
Constructor.
FBStringList::FBStringList | ( | const char * | pString, |
const char | pSeparator =
'~' |
||
) |
Constructor.
pSeparator | the string list separator. |
pString | String to set for list. |
FBStringList::FBStringList | ( | const FBStringList & | pOther | ) |
Copy constructor.
FBStringList::~FBStringList | ( | ) |
Destructor.
FBStringList& FBStringList::operator= | ( | const FBStringList & | pOther | ) |
Overload assignment operator to support deep copy.
pOther | string list to be copied from. |
KStringList* FBStringList::GetInternal | ( | ) | const |
Get internal variable.
kReference FBStringList::GetReferenceAt | ( | int | pIndex | ) | const |
Get the reference store with the string at pIndex.
pIndex | Index to get reference at. |
void FBStringList::SetReferenceAt | ( | int | pIndex, |
kReference | pRef | ||
) |
Set the reference stored with the string at pIndex.
pIndex | Index to store reference at. |
pRef | Reference to store at pIndex. |
int FBStringList::Find | ( | kReference | pRef | ) | const |
Find the index where pRef is stored.
pRef | Reference to look for. |
int FBStringList::Find | ( | const char * | pString, |
bool | pCaseSensitive =
true , |
||
bool | pStartWith =
false |
||
) | const |
Find the index with the string pString (or start with pString)
pString | String to search for. |
pCaseSensitive | true if considering case. |
pStartWith | true if to find the index of the string which start with pString. |
const char* FBStringList::GetAt | ( | int | pIndex | ) | const |
Get the string at pIndex.
pIndex | Index to get string at. |
const char* FBStringList::operator[] | ( | int | pIndex | ) | const |
Overloaded [] operator.
Returns the string at pIndex.
pIndex | Index to access. |
void FBStringList::Sort | ( | ) |
Sort the string list (ascending)
int FBStringList::GetCount | ( | ) | const |
Get the number of items in the list.
int FBStringList::Remove | ( | const char * | S | ) |
Remove a string from the list.
S | String to remove from the list. |
const char* FBStringList::AsString | ( | const char | pSeparator = '~' |
) | const |
Get as string.
pSeparator | the string list separator. |
bool FBStringList::SetString | ( | const char * | pString, |
const char | pSeparator =
'~' |
||
) |
Set string for list.
pSeparator | the string list separator. |
pString | String to set for list. |
int FBStringList::Add | ( | const char * | S, |
kReference | pRef = 0 |
||
) |
Add a string to the list.
S | String to add to list. |
pRef | Reference to store with string (default = 0) |
void FBStringList::Clear | ( | ) |
Clear the list (remove all the items).
void FBStringList::RemoveAt | ( | int | pIndex | ) |
Remove an entry at pIndex.
pIndex | Index where item is to be removed from. |
int FBStringList::IndexOf | ( | const char * | S | ) | const |
Get the index of a string.
S | String to look for. |
void FBStringList::InsertAt | ( | int | pIndex, |
const char * | S, | ||
kReference | pRef = 0 |
||
) |
Insert an entry at pIndex.
pIndex | Index where item is to be inserted. |
S | String to insert. |
pRef | Reference to store with string(default=0). |
bool FBStringList::SetAt | ( | int | pIndex, |
const char * | pString | ||
) |
Set the string at pIndex.
pIndex | Index where string is to be set. |
pString | String to set value at pIndex with. |
KStringList* FBStringList::mItems
[protected] |
Internal use only - List of items.
Definition at line 205 of file fbstring.h.