FbxMultiMap Class Reference

#include <fbxmultimap.h>

Class Description

Class to manipulate a map that can contain multiple times the same key.

Definition at line 22 of file fbxmultimap.h.

Classes

struct  Pair
 

Public Member Functions

bool Add (FbxHandle pKey, FbxHandle pItem)
 If can't find the matching item,append a item at the end of the array. More...
 
bool Remove (FbxHandle pKey)
 Remove the first matching item, whose reference is the same as given. More...
 
bool RemoveItem (FbxHandle pItem)
 Remove all the matching item, whose item is the same as given. More...
 
bool SetItem (FbxHandle pKey, FbxHandle pItem)
 Set first matching item with the given parameter. More...
 
FbxHandle Get (FbxHandle pKey, int *pIndex=((void *) 0))
 Get first matching item with the given parameter. More...
 
void Clear ()
 Delete the array. More...
 
FbxHandle GetFromIndex (int pIndex, FbxHandle *pKey=((void *) 0))
 Get the item of the given index. More...
 
bool RemoveFromIndex (int pIndex)
 Remove the item of the given index. More...
 
int GetCount () const
 Get number of items in the array. More...
 
void Swap ()
 Swap the value of Key and Item in every item of array, and sort the new array with the value of Key. More...
 
void Sort ()
 Sort the array according the value of Key in each item. More...
 

Member Function Documentation

bool Add ( FbxHandle  pKey,
FbxHandle  pItem 
)

If can't find the matching item,append a item at the end of the array.

If find the matching item ,insert the new item before the matching item.

Parameters
pKeyThe value of Key in new item, also is the character for matching.
pItemThe value of Item in new item.
Returns
If add successfully return true,otherwise return false.
bool Remove ( FbxHandle  pKey)

Remove the first matching item, whose reference is the same as given.

Parameters
pKeyThe given reference.
Returns
If remove successfully return true,otherwise return false.
bool RemoveItem ( FbxHandle  pItem)

Remove all the matching item, whose item is the same as given.

Parameters
pItemThe given item.
Returns
If remove successfully return true,otherwise return false.
bool SetItem ( FbxHandle  pKey,
FbxHandle  pItem 
)

Set first matching item with the given parameter.

Parameters
pKeyThe character for matching.
pItemThe value of Item that the matching item will be set.
Returns
If set successfully return true,otherwise return false.
FbxHandle Get ( FbxHandle  pKey,
int *  pIndex = ((void *) 0) 
)

Get first matching item with the given parameter.

Parameters
pKeyThe character for matching.
pIndexThe pointer to the index of the matching item.
Returns
The value of Item in the matching item.
Remarks
If there are multiple elements that match the character, the index returned is unspecified.
void Clear ( )

Delete the array.

FbxHandle GetFromIndex ( int  pIndex,
FbxHandle *  pKey = ((void *) 0) 
)

Get the item of the given index.

Parameters
pIndexThe index for matching.
pKeyThe pointer to the Key of the matching item.
Returns
The value of Item in the matching item.
bool RemoveFromIndex ( int  pIndex)

Remove the item of the given index.

Parameters
pIndexThe given index.
Returns
If remove successfully return true,otherwise return false.
int GetCount ( ) const
inline

Get number of items in the array.

Returns
The number of items in the array.

Definition at line 84 of file fbxmultimap.h.

84 { return mSetCount; }
void Swap ( )

Swap the value of Key and Item in every item of array, and sort the new array with the value of Key.

void Sort ( )

Sort the array according the value of Key in each item.


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