445 |
void Archive::encode() { |
void Archive::encode() { |
446 |
m_rawData.clear(); |
m_rawData.clear(); |
447 |
String s = MAGIC_START; |
String s = MAGIC_START; |
448 |
|
m_timeModified = time(NULL); |
449 |
|
if (m_timeCreated == LIBGIG_EPOCH_TIME) |
450 |
|
m_timeCreated = m_timeModified; |
451 |
s += _encodeRootBlob(); |
s += _encodeRootBlob(); |
452 |
m_rawData.resize(s.length() + 1); |
m_rawData.resize(s.length() + 1); |
453 |
memcpy(&m_rawData[0], &s[0], s.length() + 1); |
memcpy(&m_rawData[0], &s[0], s.length() + 1); |
454 |
m_isModified = false; |
m_isModified = false; |
|
m_timeModified = time(NULL); |
|
|
if (m_timeCreated == LIBGIG_EPOCH_TIME) |
|
|
m_timeCreated = m_timeModified; |
|
455 |
} |
} |
456 |
|
|
457 |
struct _Blob { |
struct _Blob { |