Rhino C++ API
8.10
|
#include <opennurbs_array.h>
Public Member Functions | |
ON_UuidList () | |
ON_UuidList (const ON_UuidList &src) | |
ON_UuidList (int capacity) | |
~ON_UuidList () | |
bool | AddUuid (ON_UUID uuid, bool bCheckForDupicates=true) |
const ON_UUID * | Array () const |
void | Compact () |
int | Count () const |
void | Destroy () |
void | Empty () |
bool | FindUuid (ON_UUID uuid) const |
int | GetUuids (ON_SimpleArray< ON_UUID > &uuid_list) const |
bool | operator!= (const ON_UuidList &other) const |
ON_UuidList & | operator= (const ON_UuidList &src) |
bool | operator== (const ON_UuidList &other) const |
bool | Read (class ON_BinaryArchive &archive) |
bool | Read (class ON_BinaryArchive &archive, bool bSortAferRead) |
void | RemapUuids (const ON_SimpleArray< ON_UuidPair > &uuid_remap) |
bool | RemoveUuid (ON_UUID uuid) |
void | Reserve (size_t capacity) |
bool | Write (class ON_BinaryArchive &archive) const |
bool | Write (class ON_BinaryArchive &archive, bool bSortBeforeWrite) const |
Static Public Member Functions | |
static int | CompareUuid (const ON_UUID *a, const ON_UUID *b) |
Description: The ON_UuidList class provides a tool to efficiently maintain a list of uuids and determine if a uuid is in the list. This class is based on the premise that there are no duplicate uuids in the list.
ON_UuidList::ON_UuidList | ( | ) |
ON_UuidList::ON_UuidList | ( | int | capacity | ) |
ON_UuidList::~ON_UuidList | ( | ) |
ON_UuidList::ON_UuidList | ( | const ON_UuidList & | src | ) |
bool ON_UuidList::AddUuid | ( | ON_UUID | uuid, |
bool | bCheckForDupicates = true |
||
) |
Description: Adds a uuid to the list. Parameters: uuid - [in] id to add. bCheckForDupicates - [in] if true, then the uuid is not added if it is already in the list. If you are certain that the uuid is not in the list and you are going to have a large list of uuids, then setting bCheckForDupicates=false will speed up the addition of uuids. Returns: True if uuid was added. False if uuid was not added because it is already in the collection.
const ON_UUID* ON_UuidList::Array | ( | ) | const |
Returns: Array of uuids in the list. Sorted with respect to ON_UuidList::CompareUuid(). Remarks: Calling AddUuid() may grow the dynamic array and make the pointer invalid.
void ON_UuidList::Compact | ( | ) |
Description: Makes the uuid list as efficient as possible in both search speed and memory usage. Use Compact() when a uuid list will be in use but is not likely to be modified. A list that has been compacted can still be modified.
Description: Fast uuid compare. Not necessarily the same as ON_UuidCompare().
int ON_UuidList::Count | ( | ) | const |
Returns: Number of active uuids in the list.
void ON_UuidList::Destroy | ( | ) |
Description: Destroy list. If list will be reused, Empty() is more efficient.
void ON_UuidList::Empty | ( | ) |
Description: Provides an efficient way to empty a list so that it can be used again.
bool ON_UuidList::FindUuid | ( | ON_UUID | uuid | ) | const |
Description: Determine if a uuid is in the list. Returns: True if uuid is in the list.
int ON_UuidList::GetUuids | ( | ON_SimpleArray< ON_UUID > & | uuid_list | ) | const |
Description: Append the uuids in this class to uuid_list. Parameters: uuid_list - [in/out] Returns: Number of uuids added to uuid_list.
bool ON_UuidList::operator!= | ( | const ON_UuidList & | other | ) | const |
ON_UuidList& ON_UuidList::operator= | ( | const ON_UuidList & | src | ) |
bool ON_UuidList::operator== | ( | const ON_UuidList & | other | ) | const |
bool ON_UuidList::Read | ( | class ON_BinaryArchive & | archive | ) |
Description: Read the uuid list from an archive. Parameters: archive - [in] archive to read from. Returns: true if the read was successful.
bool ON_UuidList::Read | ( | class ON_BinaryArchive & | archive, |
bool | bSortAferRead | ||
) |
Description: Read the uuid list from an archive. Parameters: archive - [in] archive to read from. bool bSortAfterRead - [in] True if ids should be sorted after the read so future lookups will be fast. False if the state of the sorted/unsorted bits that existed at write time should be preserved. Returns: true if the read was successful.
void ON_UuidList::RemapUuids | ( | const ON_SimpleArray< ON_UuidPair > & | uuid_remap | ) |
Description: This tool is used in rare situations when the object ids stored in the uuid list need to be remapped. Parameters: uuid_remap - [in] Is it critical that uuid_remap[] be sorted with respect to ON_UuidPair::CompareFirstUuid.
bool ON_UuidList::RemoveUuid | ( | ON_UUID | uuid | ) |
Description: Removes a uuid from the list. Parameters: uuid - [in] id to remove Returns: True if uuid was in the list and was removed. False if uuid was not in the list.
void ON_UuidList::Reserve | ( | size_t | capacity | ) |
bool ON_UuidList::Write | ( | class ON_BinaryArchive & | archive | ) | const |
Description: Saves the uuid list in an archive. Parameters: archive - [in] archive to write to. Returns: true if write was successful.
bool ON_UuidList::Write | ( | class ON_BinaryArchive & | archive, |
bool | bSortBeforeWrite | ||
) | const |
Description: Saves the uuid list in an archive. Parameters: archive - [in] archive to write to. bSortBeforeWrite - [in] True if ids should be sorted before the write so future lookups will be fast. False if the current state of the sorted/unsorted bits should be preserved. Returns: true if write was successful.