This class implements an efficient set based on value comparison, which stores values.
It executes insertion, deletion and query operations in O(log(n)) time.
#include <fbxmap.h>
Classes |
|
| class | FbxValue |
Public Types |
|
| typedef VALUE_TYPE | ValueType |
| typedef StorageType::RecordType | RecordType |
| typedef StorageType::IteratorType | Iterator |
|
typedef StorageType::ConstIteratorType |
ConstIterator |
Public Member Functions |
|
| FbxSet2 () | |
| Constructor. |
|
| FbxSet2 (const FbxSet2 &pSet) | |
| Copy constructor. |
|
| ~FbxSet2 () | |
| Destructor. |
|
| void | Reserve (unsigned int pRecordCount) |
| Preallocate memory. |
|
| int | GetSize () const |
| Retrieve the number of values it holds.
|
|
| FbxPair< RecordType *, bool > | Insert (const ValueType &pValue) |
| Insert a value. |
|
| int | Remove (const ValueType &pValue) |
| Delete a value. |
|
| void | Clear () |
| Clear the set. |
|
| bool | Empty () const |
| Query whether the set is empty. |
|
| Iterator | Begin () |
| Retrieve the begin iterator of the set.
|
|
| Iterator | End () |
| Retrieve the end iterator of the set.
|
|
| ConstIterator | Begin () const |
| Retrieve the begin iterator of the set.
|
|
| ConstIterator | End () const |
| Retrieve the end iterator of the set.
|
|
| const RecordType * | Find (const ValueType &pValue) const |
| Query a value in the set. |
|
| RecordType * | Find (const ValueType &pValue) |
| Query a value in the set. |
|
| const RecordType * | Minimum () const |
| Retrieve the minimum value in the set.
|
|
| RecordType * | Minimum () |
| Retrieve the minimum value in the set.
|
|
| const RecordType * | Maximum () const |
| Retrieve the maximum value in the set.
|
|
| RecordType * | Maximum () |
| Retrieve the maximum value in the set.
|
|
| bool | operator== (const FbxSet2< VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > &pOther) const |
| Equality operator. |
|
| bool | operator!= (const FbxSet2< VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > &pOther) const |
| Inequality operator. |
|
| FbxSet2 | Intersect (const FbxSet2 &pOther) const |
| Intersect with another set. |
|
| FbxSet2 | Union (const FbxSet2 &pOther) const |
| Unite with another set. |
|
Protected Types |
|
| typedef
FbxRedBlackTree < FbxValue, KEY_COMPARE_FUNCTOR, ALLOCATOR > |
StorageType |
Protected Attributes |
|
| StorageType | mTree |
typedef FbxRedBlackTree<FbxValue,
KEY_COMPARE_FUNCTOR, ALLOCATOR> StorageType
[protected] |
| typedef VALUE_TYPE ValueType |
| typedef StorageType::RecordType RecordType |
| typedef StorageType::IteratorType Iterator |
| void Reserve | ( | unsigned int | pRecordCount | ) | [inline] |
Preallocate memory.
| pRecordCount | The number of elements. |
| int GetSize | ( | ) | const [inline] |
Retrieve the number of values it holds.
| FbxPair<RecordType*, bool> Insert | ( | const ValueType & | pValue | ) | [inline] |
Insert a value.
| pValue | The value. |
| int Remove | ( | const ValueType & | pValue | ) | [inline] |
Delete a value.
| pValue | The value. |
true if success, false if value is
not found.| void Clear | ( | ) | [inline] |
Clear the set.
| bool Empty | ( | ) | const [inline] |
Query whether the set is empty.
| Iterator Begin | ( | ) | [inline] |
Retrieve the begin iterator of the set.
| Iterator End | ( | ) | [inline] |
| ConstIterator Begin | ( | ) | const [inline] |
Retrieve the begin iterator of the set.
Definition at line 1722 of file fbxmap.h.
{
return ConstIterator(Minimum());
}
| ConstIterator End | ( | ) | const [inline] |
Retrieve the end iterator of the set.
Definition at line 1728 of file fbxmap.h.
{
return ConstIterator();
}
| const RecordType* Find | ( | const ValueType & | pValue | ) | const [inline] |
Query a value in the set.
| pKey | The key. |
| RecordType* Find | ( | const ValueType & | pValue | ) | [inline] |
Query a value in the set.
| pKey | The key. |
| const RecordType* Minimum | ( | ) | const [inline] |
Retrieve the minimum value in the set.
| RecordType* Minimum | ( | ) | [inline] |
Retrieve the minimum value in the set.
| const RecordType* Maximum | ( | ) | const [inline] |
Retrieve the maximum value in the set.
| RecordType* Maximum | ( | ) | [inline] |
Retrieve the maximum value in the set.
| bool operator== | ( | const FbxSet2< VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > & | pOther | ) | const [inline] |
| bool operator!= | ( | const FbxSet2< VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > & | pOther | ) | const [inline] |
| FbxSet2 Intersect | ( | const FbxSet2< VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > & | pOther | ) | const [inline] |
Intersect with another set.
| The | other set. |
| FbxSet2 Union | ( | const FbxSet2< VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > & | pOther | ) | const [inline] |
Unite with another set.
| The | other set. |
StorageType mTree
[protected] |