Sync changes from upstream repository

This commit is contained in:
Bozo the Builder
2025-05-13 04:08:15 -07:00
parent b2a5e49ef6
commit 76f86d7e68
15 changed files with 779 additions and 282 deletions

View File

@@ -1282,104 +1282,7 @@ private:
};
class ON_CLASS ON_UuidPtrList2
{
public:
ON_UuidPtrList2();
~ON_UuidPtrList2();
ON_UuidPtrList2(const ON_UuidPtrList2& src);
ON_UuidPtrList2& operator=(const ON_UuidPtrList2& src);
unsigned int Count() const;
void RemoveAll();
void Reserve(size_t capacity);
bool AddUuidPtr(const ON_UUID& uuid, ON__UINT_PTR ptr);
bool RemoveUuid(const ON_UUID& uuid);
bool FindUuid(const ON_UUID& uuid) const;
bool FindUuid(const ON_UUID& uuid, ON__UINT_PTR* ptr) const;
bool FindUuidPtr(const ON_UUID& uuid, ON__UINT_PTR index) const;
unsigned int GetUuids(ON_SimpleArray<ON_UUID>& uuid_list) const;
void ImproveSearchSpeed();
private:
#pragma warning (push)
#pragma warning (disable : 4251)
std::unique_ptr<class ON_UuidPtrList2_Private> m_private;
unsigned int padding[2];
#if defined (ON_RUNTIME_ANDROID) //Android has 32-bit pointers?
unsigned char padding_array[12];
#else
unsigned char padding_array[16];
#endif
#pragma warning (pop)
};
class ON_CLASS ON_UuidPairList2
{
public:
ON_UuidPairList2();
~ON_UuidPairList2();
ON_UuidPairList2(const ON_UuidPairList2& src);
ON_UuidPairList2& operator=(const ON_UuidPairList2& src);
static const ON_UuidPairList2 EmptyList;
unsigned int Count() const;
void Empty();
void Reserve(size_t capacity);
bool AddPair(const ON_UUID& id1, const ON_UUID& id2);
bool RemovePair(const ON_UUID& id1);
bool RemovePair(const ON_UUID& id1, const ON_UUID& id2);
bool FindId1(const ON_UUID& id1, ON_UUID* id2 = 0) const;
bool FindPair(const ON_UUID& id1, const ON_UUID& id2) const;
int GetId1s(ON_SimpleArray<ON_UUID>& uuid_list) const;
void ImproveSearchSpeed();
private:
#pragma warning (push)
#pragma warning (disable : 4251)
std::unique_ptr<class ON_UuidPairList2_Private> m_private;
unsigned int padding[2];
#if defined (ON_RUNTIME_ANDROID) //Android has 32-bit pointers?
unsigned char padding_array[12];
#else
unsigned char padding_array[16];
#endif
#pragma warning (pop)
};
class ON_CLASS ON_UuidIndexList2
{
public:
ON_UuidIndexList2();
~ON_UuidIndexList2();
ON_UuidIndexList2(const ON_UuidIndexList2& src);
ON_UuidIndexList2& operator=(const ON_UuidIndexList2& src);
unsigned int Count() const;
void RemoveAll();
void Reserve(size_t capacity);
bool AddUuidIndex(const ON_UUID& uuid, int index);
bool RemoveUuid(const ON_UUID& uuid);
bool FindUuid(const ON_UUID& uuid) const;
bool FindUuid(const ON_UUID& uuid, int* index) const;
bool FindUuidIndex(const ON_UUID& uuid, int index) const;
unsigned int GetUuids(ON_SimpleArray<ON_UUID>& uuid_list) const;
void ImproveSearchSpeed();
private:
#pragma warning (push)
#pragma warning (disable : 4251)
std::unique_ptr<class ON_UuidIndexList2_Private> m_private;
unsigned int padding[2];
#if defined (ON_RUNTIME_ANDROID) //Android has 32-bit pointers?
unsigned char padding_array[12];
#else
unsigned char padding_array[16];
#endif
#pragma warning (pop)
};
@@ -1536,6 +1439,92 @@ private:
class ON_CLASS ON_UuidPtrList2
{
public:
ON_UuidPtrList2();
~ON_UuidPtrList2();
ON_UuidPtrList2(const ON_UuidPtrList2& src);
ON_UuidPtrList2& operator=(const ON_UuidPtrList2& src);
unsigned int Count() const;
void RemoveAll();
void Reserve(size_t capacity);
bool AddUuidPtr(const ON_UUID& uuid, ON__UINT_PTR ptr);
bool RemoveUuid(const ON_UUID& uuid);
bool FindUuid(const ON_UUID& uuid) const;
bool FindUuid(const ON_UUID& uuid, ON__UINT_PTR* ptr) const;
bool FindUuidPtr(const ON_UUID& uuid, ON__UINT_PTR index) const;
unsigned int GetUuids(ON_SimpleArray<ON_UUID>& uuid_list) const;
void ImproveSearchSpeed();
private:
#pragma warning (push)
#pragma warning (disable : 4251)
std::unique_ptr<class ON_UuidPtrList2_Private> m_private;
unsigned char padding[sizeof(ON_UuidPtrList) - sizeof(m_private)];
#pragma warning (pop)
};
class ON_CLASS ON_UuidPairList2
{
public:
ON_UuidPairList2();
~ON_UuidPairList2();
ON_UuidPairList2(const ON_UuidPairList2& src);
ON_UuidPairList2& operator=(const ON_UuidPairList2& src);
static const ON_UuidPairList2 EmptyList;
unsigned int Count() const;
void Empty();
void Reserve(size_t capacity);
bool AddPair(const ON_UUID& id1, const ON_UUID& id2);
bool RemovePair(const ON_UUID& id1);
bool RemovePair(const ON_UUID& id1, const ON_UUID& id2);
bool FindId1(const ON_UUID& id1, ON_UUID* id2 = 0) const;
bool FindPair(const ON_UUID& id1, const ON_UUID& id2) const;
int GetId1s(ON_SimpleArray<ON_UUID>& uuid_list) const;
void ImproveSearchSpeed();
private:
#pragma warning (push)
#pragma warning (disable : 4251)
std::unique_ptr<class ON_UuidPairList2_Private> m_private;
unsigned char padding[sizeof(ON_UuidPairList) - sizeof(m_private)];
#pragma warning (pop)
};
class ON_CLASS ON_UuidIndexList2
{
public:
ON_UuidIndexList2();
~ON_UuidIndexList2();
ON_UuidIndexList2(const ON_UuidIndexList2& src);
ON_UuidIndexList2& operator=(const ON_UuidIndexList2& src);
unsigned int Count() const;
void RemoveAll();
void Reserve(size_t capacity);
bool AddUuidIndex(const ON_UUID& uuid, int index);
bool RemoveUuid(const ON_UUID& uuid);
bool FindUuid(const ON_UUID& uuid) const;
bool FindUuid(const ON_UUID& uuid, int* index) const;
bool FindUuidIndex(const ON_UUID& uuid, int index) const;
unsigned int GetUuids(ON_SimpleArray<ON_UUID>& uuid_list) const;
void ImproveSearchSpeed();
private:
#pragma warning (push)
#pragma warning (disable : 4251)
std::unique_ptr<class ON_UuidIndexList2_Private> m_private;
unsigned char padding[sizeof(ON_UuidIndexList) - sizeof(m_private)];
#pragma warning (pop)
};
class ON_CLASS ON_2dexMap : private ON_SimpleArray<ON_2dex>
{