FieldId.h
// FieldId.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2007
@import "cxOperation.h"
@import "Ceda/cxPersistStore/OID.h"
@import "Ceda/cxObject/FieldPath.h"
namespace ceda
{
class Archive;
class xostream;
struct FieldId
{
explicit operator bool() const { return (bool) oid; }
OID oid;
FieldPath path;
};
inline bool operator==(const FieldId& f1, const FieldId& f2)
{
return f1.oid == f2.oid && f1.path == f2.path;
}
inline bool operator!=(const FieldId& f1, const FieldId& f2)
{
return f1.oid != f2.oid || f1.path != f2.path;
}
inline bool operator<(const FieldId& f1, const FieldId& f2)
{
return f1.oid < f2.oid ||
(f1.oid == f2.oid && f1.path < f2.path);
}
@api xostream& operator<<(xostream& os, const FieldId& f);
@api void Serialise(Archive& ar, const FieldId& f);
@api void Deserialise(InputArchive& ar, FieldId& f);
} // namespace ceda