|
|
@ -42,8 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com |
|
|
|
#include "plUUID.h" |
|
|
|
#include "plUUID.h" |
|
|
|
#include "hsStream.h" |
|
|
|
#include "hsStream.h" |
|
|
|
|
|
|
|
|
|
|
|
COMPILER_ASSERT(msizeof(Uuid, data) == msizeof(plUUID, fData)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plUUID::plUUID() |
|
|
|
plUUID::plUUID() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Clear(); |
|
|
|
Clear(); |
|
|
@ -59,11 +57,6 @@ plUUID::plUUID( const plUUID & other ) |
|
|
|
CopyFrom( &other ); |
|
|
|
CopyFrom( &other ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
plUUID::plUUID( const Uuid & uuid ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
MemCopy(fData, uuid.data, sizeof(fData)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plUUID::Read( hsStream * s) |
|
|
|
void plUUID::Read( hsStream * s) |
|
|
|
{ |
|
|
|
{ |
|
|
|
s->LogSubStreamPushDesc("plUUID"); |
|
|
|
s->LogSubStreamPushDesc("plUUID"); |
|
|
@ -75,29 +68,12 @@ void plUUID::Write( hsStream * s) |
|
|
|
s->Write( sizeof( fData ), (const void*)fData ); |
|
|
|
s->Write( sizeof( fData ), (const void*)fData ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
plUUID::operator Uuid () const { |
|
|
|
|
|
|
|
Uuid uuid; |
|
|
|
|
|
|
|
MemCopy(uuid.data, fData, sizeof(uuid.data)); |
|
|
|
|
|
|
|
return uuid; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char * plUUID::AsString() const { |
|
|
|
const char * plUUID::AsString() const { |
|
|
|
static std::string str; |
|
|
|
static std::string str; |
|
|
|
ToStdString(str); |
|
|
|
ToStdString(str); |
|
|
|
return str.c_str(); |
|
|
|
return str.c_str(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void plUUID::CopyFrom( const plUUID * v ) { |
|
|
|
|
|
|
|
if (!v) |
|
|
|
|
|
|
|
Clear(); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
CopyFrom(*v); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plUUID::CopyFrom( const plUUID & v ) { |
|
|
|
|
|
|
|
MemCopy(fData, v.fData, sizeof(fData)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
/*****************************************************************************
|
|
|
|
* |
|
|
|
* |
|
|
|
* plCreatableUuid |
|
|
|
* plCreatableUuid |
|
|
|