2023-02-11 01:33:55 +00:00
|
|
|
#include "generatedrefid.hpp"
|
|
|
|
|
2023-03-24 11:31:37 +00:00
|
|
|
#include "serializerefid.hpp"
|
|
|
|
|
2023-02-11 01:33:55 +00:00
|
|
|
#include <ostream>
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
std::string GeneratedRefId::toString() const
|
|
|
|
{
|
2023-03-24 11:31:37 +00:00
|
|
|
std::string result;
|
2023-04-19 22:24:49 +00:00
|
|
|
result.resize(getHexIntegralSizeWith0x(mValue), '\0');
|
2023-04-07 19:40:44 +00:00
|
|
|
serializeHexIntegral(mValue, 0, result);
|
2023-03-24 11:31:37 +00:00
|
|
|
return result;
|
2023-02-11 01:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string GeneratedRefId::toDebugString() const
|
|
|
|
{
|
2023-03-24 11:31:37 +00:00
|
|
|
std::string result;
|
|
|
|
serializeRefIdValue(mValue, generatedRefIdPrefix, result);
|
|
|
|
return result;
|
2023-02-11 01:33:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::ostream& operator<<(std::ostream& stream, GeneratedRefId value)
|
|
|
|
{
|
2023-03-24 11:31:37 +00:00
|
|
|
return stream << value.toDebugString();
|
2023-02-11 01:33:55 +00:00
|
|
|
}
|
|
|
|
}
|