#include <fbxstringlist.h>
Base class of FbxStringList.
Definition at line 50 of file fbxstringlist.h.
Public Member Functions |
|
|
Operation With The Array
|
|
| int | AddItem (Type *pItem) |
| Append a item at the end of the array.
|
|
| int | InsertItemAt (int pIndex, Type *pItem) |
| Insert a item in the array. |
|
| Type * | GetItemAt (int pIndex) const |
| Access item at given index. |
|
| int | FindItem (Type *pItem) const |
| Find first matching item. |
|
|
Constructor and Destructor
|
|
| FbxStringListT () | |
| Default constructor. |
|
| virtual | ~FbxStringListT () |
| Destructor. |
|
| void | RemoveLast () |
| Remove the item at the end of the array and
delete the associated object. |
|
| int | GetCount () const |
| Get number of items in the array. |
|
| FbxString & | operator[] (int pIndex) |
| Access the string in the item at given
index. |
|
| FbxHandle | GetReferenceAt (int pIndex) const |
| Access the value of reference in the item at
given index. |
|
| void | SetReferenceAt (int pIndex, FbxHandle pRef) |
| Set the value of reference at given index.
|
|
| char * | GetStringAt (int pIndex) const |
| Access the pointer of string at given index.
|
|
| virtual bool | SetStringAt (int pIndex, const char *pString) |
| Set string at given index. |
|
| int | Find (Type &pItem) const |
| Find first matching item. |
|
| int | FindIndex (FbxHandle pReference) const |
| Find first matching item which has the same
reference as given parameter. |
|
| int | FindIndex (const char *pString) const |
| Find first matching item in array whose
string address is the same as given pointer. |
|
| FbxHandle | FindReference (const char *pString) const |
| Access the value of reference of the first
matching item in array whose string address is the same as given
pointer. |
|
| bool | Remove (Type &pItem) |
| Remove first matching item. |
|
| bool | Remove (const char *pString) |
| Remove first matching item in array whose
string address is the same as given pointer. |
|
| bool | RemoveIt (Type &pItem) |
| Remove first matching item. |
|
| void | Sort () |
| Sort the array by the string of every
item,not case sensitive. |
|
| void * | FindEqual (const char *pString) const |
| Find first matching item which has the same
string as given parameter,not case sensitive. |
|
| void * | FindCaseSensitive (const char *pString) const |
| Find first matching item which has the same
string as given parameter, case sensitive. |
|
| int | Add (const char *pString, FbxHandle pItem=0) |
| Add a new item at the end of array. |
|
| virtual int | InsertAt (int pIndex, const char *pString, FbxHandle pItem=0) |
| virtual void | RemoveAt (int pIndex) |
| Remove the item at the given position in the
array and delete the associated object. |
|
| virtual void | Clear () |
| Delete the array. |
|
| virtual void | GetText (FbxString &pText) const |
| Get the string of all the item. |
|
| virtual int | SetText (const char *pList) |
| Clear the array and set the array's new
items with the substring separated by '~' from the given string.
|
|
Protected Attributes |
|
| FbxArray< Type * > | mList |
| FbxStringListT | ( | ) | [inline] |
| virtual ~FbxStringListT | ( | ) | [inline, virtual] |
| int AddItem | ( | Type * | pItem | ) | [inline] |
Append a item at the end of the array.
Definition at line 64 of file fbxstringlist.h.
| int InsertItemAt | ( | int | pIndex, |
| Type * | pItem | ||
| ) | [inline] |
Insert a item in the array.
| pIndex | Position where to insert the item. |
| pItem | Item to insert. |
Definition at line 72 of file fbxstringlist.h.
| Type* GetItemAt | ( | int | pIndex | ) | const [inline] |
Access item at given index.
Definition at line 75 of file fbxstringlist.h.
{ return mList[pIndex]; }
| int FindItem | ( | Type * | pItem | ) | const [inline] |
Find first matching item.
Definition at line 80 of file fbxstringlist.h.
| void RemoveLast | ( | ) | [inline] |
Remove the item at the end of the array and delete the associated object.
Definition at line 99 of file fbxstringlist.h.
| int GetCount | ( | ) | const [inline] |
Get number of items in the array.
Definition at line 104 of file fbxstringlist.h.
{ return mList.GetCount(); }
| FbxString& operator[] | ( | int | pIndex | ) | [inline] |
Access the string in the item at given index.
Definition at line 107 of file fbxstringlist.h.
{ return mList[pIndex]->mString; }
| FbxHandle GetReferenceAt | ( | int | pIndex | ) | const [inline] |
Access the value of reference in the item at given index.
Definition at line 110 of file fbxstringlist.h.
{ return mList[pIndex]->mReference; }
| void SetReferenceAt | ( | int | pIndex, |
| FbxHandle | pRef | ||
| ) | [inline] |
Set the value of reference at given index.
Definition at line 113 of file fbxstringlist.h.
{ mList[pIndex]->mReference = pRef; }
| char* GetStringAt | ( | int | pIndex | ) | const [inline] |
Access the pointer of string at given index.
Definition at line 116 of file fbxstringlist.h.
| virtual bool SetStringAt | ( | int | pIndex, |
| const char * | pString | ||
| ) | [inline, virtual] |
Set string at given index.
Definition at line 119 of file fbxstringlist.h.
| int Find | ( | Type & | pItem | ) | const [inline] |
Find first matching item.
Definition at line 132 of file fbxstringlist.h.
| int FindIndex | ( | FbxHandle | pReference | ) | const [inline] |
Find first matching item which has the same reference as given parameter.
Definition at line 146 of file fbxstringlist.h.
| int FindIndex | ( | const char * | pString | ) | const [inline] |
Find first matching item in array whose string address is the same as given pointer.
Definition at line 160 of file fbxstringlist.h.
| FbxHandle FindReference | ( | const char * | pString | ) | const [inline] |
Access the value of reference of the first matching item in array whose string address is the same as given pointer.
Definition at line 175 of file fbxstringlist.h.
| bool Remove | ( | Type & | pItem | ) | [inline] |
Remove first matching item.
Definition at line 185 of file fbxstringlist.h.
| bool Remove | ( | const char * | pString | ) | [inline] |
Remove first matching item in array whose string address is the same as given pointer.
Definition at line 196 of file fbxstringlist.h.
| bool RemoveIt | ( | Type & | pItem | ) | [inline] |
Remove first matching item.
Definition at line 207 of file fbxstringlist.h.
| void Sort | ( | ) | [inline] |
Sort the array by the string of every item,not case sensitive.
Definition at line 218 of file fbxstringlist.h.
{
qsort( &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListSort );
}
| void* FindEqual | ( | const char * | pString | ) | const [inline] |
Find first matching item which has the same string as given parameter,not case sensitive.
Definition at line 227 of file fbxstringlist.h.
{
FbxStringListItem Key(pString);
if (mList.GetCount() != 0)
{
return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListFindEqual );
}
else
{
return NULL ;
}
}
| void* FindCaseSensitive | ( | const char * | pString | ) | const [inline] |
Find first matching item which has the same string as given parameter, case sensitive.
Definition at line 245 of file fbxstringlist.h.
{
FbxStringListItem Key(pString);
if (mList.GetCount() != 0)
{
return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*), FbxCompareCaseSensitiveStringList);
}
else
{
return NULL ;
}
}
| int Add | ( | const char * | pString, |
| FbxHandle | pItem = 0 |
||
| ) | [inline] |
Add a new item at the end of array.
Definition at line 262 of file fbxstringlist.h.
| virtual int InsertAt | ( | int | pIndex, |
| const char * | pString, | ||
| FbxHandle | pItem = 0 |
||
| ) | [inline, virtual] |
Definition at line 267 of file fbxstringlist.h.
| virtual void RemoveAt | ( | int | pIndex | ) | [inline, virtual] |
Remove the item at the given position in the array and delete the associated object.
| pIndex | Position of the item to remove. |
Definition at line 278 of file fbxstringlist.h.
| virtual void Clear | ( | ) | [inline, virtual] |
| virtual void GetText | ( | FbxString & | pText | ) | const [inline, virtual] |
Get the string of all the item.
Definition at line 292 of file fbxstringlist.h.
| virtual int SetText | ( | const char * | pList | ) | [inline, virtual] |
Clear the array and set the array's new items with the substring separated by '~' from the given string.
| pList | The string which used to generate the new items. |
Definition at line 311 of file fbxstringlist.h.
{
int lPos=0, lOldPos = 0;
int lLastIndex=0;
FbxString lName=pList;
Clear();
for (lPos=0; lName.Buffer()[lPos]!=0; lPos++) {
if (lName.Buffer()[lPos]=='~') {
lName.Buffer()[lPos]=0;
lLastIndex = Add(lName.Buffer()+lOldPos);
lOldPos=lPos+1;
}
}
if(lOldPos != lPos)
{
lLastIndex = Add(lName.Buffer()+lOldPos);
}
return lLastIndex;
}
Definition at line 53 of file fbxstringlist.h.