29#include <boost/uuid/uuid.hpp>
31#include <nlohmann/json_fwd.hpp>
52 KIID(
const std::string& aString );
53 KIID(
const char* aString );
54 KIID(
const wxString& aString );
70 static bool SniffTest(
const wxString& aCandidate );
148 bool MakeRelativeTo(
const KIID_PATH& aPath );
159 bool EndsWith(
const KIID_PATH& aPath )
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 ) )
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
static void SeedGenerator(unsigned int aSeed)
Re-initialize the UUID generator with a given seed (for testing or QA purposes)
wxString AsString() const
boost::uuids::uuid m_uuid
void Increment()
Generates a deterministic replacement for a given ID.
bool operator>(KIID const &rhs) const
wxString AsLegacyTimestampString() const
timestamp_t AsLegacyTimestamp() const
static void CreateNilUuids(bool aNil=true)
A performance optimization which disables/enables the generation of pseudo-random UUIDs.
static bool SniffTest(const wxString &aCandidate)
Returns true if a string has the correct formatting to be a KIID.
bool operator!=(KIID const &rhs) const
bool operator==(KIID const &rhs) const
void Clone(const KIID &aUUID)
bool IsLegacyTimestamp() const
bool operator<(KIID const &rhs) const
void ConvertTimestampToUuid()
Change an existing time stamp based UUID into a true UUID.
void from_json(const nlohmann::json &aJson, KIID &aKIID)
void to_json(nlohmann::json &aJson, const KIID &aKIID)
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.
_OUT_STRING AsString(const std::string &aString)