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;
71 static bool SniffTest(
const wxString& aCandidate );
78 static void CreateNilUuids(
bool aNil =
true );
89 static void SeedGenerator(
unsigned int aSeed );
96 void ConvertTimestampToUuid();
108 return m_uuid == rhs.
m_uuid;
113 return m_uuid != rhs.
m_uuid;
118 return m_uuid < rhs.
m_uuid;
123 return m_uuid > rhs.
m_uuid;
149 bool MakeRelativeTo(
const KIID_PATH& aPath );
160 bool EndsWith(
const KIID_PATH& aPath )
const;
162 wxString AsString()
const;
166 if( size() != rhs.size() )
169 for(
size_t i = 0; i < size(); ++i )
171 if( at( i ) != rhs.at( i ) )
180 if( size() != rhs.size() )
181 return size() < rhs.size();
183 for(
size_t i = 0; i < size(); ++i )
185 if( at( i ) < rhs.at( i ) )
188 if( at( i ) != rhs.at( i ) )
RAII class to safely set/reset nil KIIDs for use in footprint/symbol loading.
bool operator==(KIID_PATH const &rhs) const
bool operator<(KIID_PATH const &rhs) const
timestamp_t m_cached_timestamp
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.