|
|
|
@ -13,8 +13,9 @@ namespace ESM
|
|
|
|
|
// RefId is used to represent an Id that identifies an ESM record. These Ids can then be used in
|
|
|
|
|
// ESM::Stores to find the actual record. These Ids can be serialized/de-serialized, stored on disk and remain
|
|
|
|
|
// valid. They are used by ESM files, by records to reference other ESM records.
|
|
|
|
|
struct RefId
|
|
|
|
|
class RefId
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
const static RefId sEmpty;
|
|
|
|
|
|
|
|
|
|
bool empty() const { return mId.empty(); }
|
|
|
|
@ -32,17 +33,16 @@ namespace ESM
|
|
|
|
|
static RefId formIdRefId(const ESM4::FormId id);
|
|
|
|
|
const std::string& getRefIdString() const { return mId; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string mId;
|
|
|
|
|
|
|
|
|
|
bool operator==(std::string_view rhs) const;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
template <std::size_t size>
|
|
|
|
|
bool operator==(const char (&rhs)[size]) const
|
|
|
|
|
{
|
|
|
|
|
return *this == std::string_view(rhs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string mId;
|
|
|
|
|
|
|
|
|
|
bool operator==(std::string_view rhs) const;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|