36 #define MFM_UUID_FOR(label, apiVersion) UUID(label,(u32) apiVersion, (u32) MFM_BUILD_DATE, (u32) MFM_BUILD_TIME, UUID::ComputeConfigurationCode<CC>())
47 UUID() : m_configurationCode(0), m_apiVersion(0), m_hexDate(0), m_hexTime(0)
54 static u32 ComputeConfigurationCode() {
56 val = (val<<4) + CC::ATOM_TYPE::ATOM_CATEGORY;
57 val = (val<<4) + CC::PARAM_CONFIG::EVENT_WINDOW_RADIUS;
58 val = (val<<4) + CC::PARAM_CONFIG::ELEMENT_TABLE_BITS;
59 val = (val<<4) + CC::PARAM_CONFIG::ELEMENT_DATA_SLOTS;
60 val = (val<<8) + CC::PARAM_CONFIG::TILE_WIDTH;
61 val = (val<<8) + CC::PARAM_CONFIG::BITS_PER_ATOM;
65 UUID(
const char * label,
const u32 apiVersion,
const u32 decDate,
const u32 decTime,
const u32 configCode)
66 : m_configurationCode(configCode),
67 m_apiVersion(apiVersion),
68 m_hexDate(decDate), m_hexTime(decTime)
73 FAIL(ILLEGAL_ARGUMENT);
105 static bool LegalFilename(
const char* label)
110 return 4==zbs.Scanf(
"%@.so",&temp);
113 UUID(ByteSource & bs) ;
115 const char * GetLabel()
const {
118 u32 GetVersion()
const {
return m_apiVersion; }
119 u32 GetHexDate()
const {
return m_hexDate; }
120 u32 GetHexTime()
const {
return m_hexTime; }
121 u32 GetConfigurationCode()
const {
return m_configurationCode; }
123 bool CompatibleConfigurationCode(
const UUID & other)
const ;
124 bool CompatibleLabel(
const UUID & other)
const ;
125 bool CompatibleAPIVersion(
const UUID & other)
const ;
126 bool CompatibleButStrictlyNewer(
const UUID & other)
const ;
128 bool Compatible(
const UUID & other)
const ;
130 void Print(ByteSink & bs)
const ;
145 bool Equals(
const UUID & other)
const {
146 return *
this == other;
149 bool operator==(
const UUID & other)
const ;
151 bool operator!=(
const UUID & other)
const {
152 return !(*
this == other);
159 s32 CompareDateOnly(
const UUID & other)
const ;
162 u32 m_configurationCode;
Definition: ZStringByteSource.h:40
bool ScanCamelIdentifier(ByteSink &result)
Definition: ByteSource.h:331
void Reset()
Definition: OverflowableCharBufferByteSink.h:192
Result PrintTo(ByteSink &bs, s32 argument=0)
Definition: UUID.h:132
const char * GetZString()
Definition: OverflowableCharBufferByteSink.h:143
Definition: ByteSource.h:44
bool HasOverflowed() const
Definition: OverflowableCharBufferByteSink.h:206
static bool LegalLabel(const char *label)
Definition: UUID.h:85
Definition: ByteSink.h:47
void Print(const char *str, s32 fieldWidth=-1, u8 padChar= ' ')
Definition: ByteSink.cpp:31
const char * GetBuffer() const
Definition: OverflowableCharBufferByteSink.h:158
Result ReadFrom(ByteSource &bs, s32 argument=0)
Definition: UUID.h:139
s32 Read()
Definition: ByteSource.h:66
Definition: ByteSerializable.h:45