30#include <boost/uuid/uuid.hpp>
32#include <nlohmann/json_fwd.hpp>
53 KIID(
const std::string& aString );
54 KIID(
const char* aString );
55 KIID(
const wxString& aString );
58 void Clone(
const KIID& aUUID );
62 bool IsLegacyTimestamp()
const;
65 wxString AsString()
const;
66 wxString AsLegacyTimestampString()
const;
67 std::string AsStdString()
const;
72 static bool SniffTest(
const wxString& aCandidate );
79 static void CreateNilUuids(
bool aNil =
true );
90 static void SeedGenerator(
unsigned int aSeed );
97 void ConvertTimestampToUuid();
109 return m_uuid == rhs.
m_uuid;
114 return m_uuid != rhs.
m_uuid;
119 return m_uuid < rhs.
m_uuid;
124 return m_uuid > rhs.
m_uuid;
148 bool MakeRelativeTo(
const KIID_PATH& aPath );
159 bool EndsWith(
const KIID_PATH& aPath )
const;
161 wxString AsString()
const;
165 if( size() != rhs.size() )
168 for(
size_t i = 0; i < size(); ++i )
170 if( at( i ) != rhs.at( i ) )
179 if( size() != rhs.size() )
180 return size() < rhs.size();
182 for(
size_t i = 0; i < size(); ++i )
184 if( at( i ) < rhs.at( i ) )
187 if( at( i ) != rhs.at( i ) )
196 if( size() != rhs.size() )
197 return size() > rhs.size();
199 for(
size_t i = 0; i < size(); ++i )
201 if( at( i ) > rhs.at( i ) )
204 if( at( i ) != rhs.at( i ) )
213 for(
const KIID& kiid : aRhs )
214 emplace_back( kiid );
RAII class to safely set/reset nil KIIDs for use in footprint/symbol loading.
KIID_PATH & operator+=(const KIID_PATH &aRhs)
bool operator>(KIID_PATH const &rhs) const
bool operator==(KIID_PATH const &rhs) const
bool operator<(KIID_PATH const &rhs) const
friend KIID_PATH operator+(KIID_PATH aLhs, const KIID_PATH &aRhs)
boost::uuids::uuid m_uuid
bool operator>(KIID const &rhs) const
static void CreateNilUuids(bool aNil=true)
A performance optimization which disables/enables the generation of pseudo-random UUIDs.
bool operator!=(KIID const &rhs) const
bool operator==(KIID const &rhs) const
bool operator<(KIID const &rhs) const
KICOMMON_API KIID & NilUuid()
KICOMMON_API void from_json(const nlohmann::json &aJson, KIID &aKIID)
KICOMMON_API void to_json(nlohmann::json &aJson, const KIID &aKIID)
KICOMMON_API KIID niluuid
uint32_t timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
This file contains macros just for swig binding.
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
std::size_t operator()(const KIID &aId) const