KiCad PCB EDA Suite
kiid.h File Reference
#include <boost/uuid/uuid.hpp>
#include <macros_swig.h>
#include <nlohmann/json_fwd.hpp>
#include <string>

Go to the source code of this file.

Classes

class  KIID
 
class  KIID_PATH
 
class  KIID_NIL_SET_RESET
 RAII class to safely set/reset nil KIIDs for use in footprint/symbol loading. More...
 

Typedefs

typedef uint32_t timestamp_t
 timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the timestamp when they were created. More...
 

Functions

KIIDNilUuid ()
 
void to_json (nlohmann::json &aJson, const KIID &aKIID)
 
void from_json (const nlohmann::json &aJson, KIID &aKIID)
 

Variables

KIID niluuid
 

Typedef Documentation

◆ timestamp_t

typedef uint32_t timestamp_t

timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the timestamp when they were created.

Long term, this type might be renamed to something like unique_id_t (and then rename all the methods from {Get,Set}TimeStamp() to {Get,Set}Id()) ?

Definition at line 45 of file kiid.h.

Function Documentation

◆ from_json()

void from_json ( const nlohmann::json aJson,
KIID aKIID 
)

Definition at line 376 of file kiid.cpp.

377{
378 aKIID = KIID( aJson.get<std::string>() );
379}
Definition: kiid.h:48

◆ NilUuid()

KIID & NilUuid ( )

Definition at line 67 of file kiid.cpp.

68{
69 static KIID nil( 0 );
70 return nil;
71}

Referenced by SCH_SEXPR_PARSER::parseSchSymbolInstances().

◆ to_json()

void to_json ( nlohmann::json aJson,
const KIID aKIID 
)

Definition at line 370 of file kiid.cpp.

371{
372 aJson = aKIID.AsString().ToUTF8();
373}
wxString AsString() const
Definition: kiid.cpp:257

References KIID::AsString().

Variable Documentation

◆ niluuid

KIID niluuid
extern