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 <fbxset.h>
Classes | |
| class | Value |
| This class defines the value type used by the set. More... | |
Public Types | |
| typedef Type | ValueType |
| typedef StorageType::RecordType | RecordType |
| typedef StorageType::IteratorType | Iterator |
| typedef StorageType::ConstIteratorType | ConstIterator |
Public Member Functions | |
| 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< Type, Compare, Allocator > &pOther) const |
| Equality operator. | |
| bool | operator!= (const FbxSet2< Type, Compare, 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. | |
| FbxSet2 () | |
| FbxSet2 (const FbxSet2 &pSet) | |
| ~FbxSet2 () | |
Protected Types | |
| typedef FbxRedBlackTree< Value, Compare, Allocator > | StorageType |
| Declaration of the storage type used by the set. | |
typedef FbxRedBlackTree<Value, Compare, Allocator> StorageType [protected] |
Declaration of the storage type used by the set.
| typedef Type ValueType |
| typedef StorageType::RecordType RecordType |
| typedef StorageType::IteratorType Iterator |
| void Reserve | ( | unsigned int | pRecordCount | ) | [inline] |
| int GetSize | ( | ) | const [inline] |
| FbxPair<RecordType*, bool> Insert | ( | const ValueType & | pValue | ) | [inline] |
| int Remove | ( | const ValueType & | pValue | ) | [inline] |
| bool Empty | ( | ) | const [inline] |
| 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 237 of file fbxset.h.
{
return ConstIterator(Minimum());
}
| ConstIterator End | ( | ) | const [inline] |
Retrieve the end iterator of the set.
Definition at line 243 of file fbxset.h.
{
return ConstIterator();
}
| const RecordType* Find | ( | const ValueType & | pValue | ) | const [inline] |
| RecordType* Find | ( | const ValueType & | pValue | ) | [inline] |
| const RecordType* Minimum | ( | ) | const [inline] |
| RecordType* Minimum | ( | ) | [inline] |
| const RecordType* Maximum | ( | ) | const [inline] |
| RecordType* Maximum | ( | ) | [inline] |
| bool operator== | ( | const FbxSet2< Type, Compare, Allocator > & | pOther | ) | const [inline] |
| bool operator!= | ( | const FbxSet2< Type, Compare, Allocator > & | pOther | ) | const [inline] |
Intersect with another set.
| The | other set. |
Unite with another set.
| The | other set. |