Add serialization for FrameRefType

This commit is contained in:
Benson Joeris
2019-02-18 17:33:59 +00:00
committed by Baldur Karlsson
parent c289290ffa
commit 5e49b076b5
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -53,6 +53,20 @@ void SetReplayResourceIDs()
INSTANTIATE_SERIALISE_TYPE(ResourceManagerInternal::WrittenRecord);
template <>
std::string DoStringise(const FrameRefType &el)
{
BEGIN_ENUM_STRINGISE(FrameRefType)
{
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_None, "None");
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_PartialWrite, "Partial Write");
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_CompleteWrite, "Complete Write");
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_Read, "Read");
STRINGISE_ENUM_CLASS_NAMED(eFrameRef_ReadBeforeWrite, "Read Before Write");
}
END_ENUM_STRINGISE()
}
FrameRefType ComposeFrameRefs(FrameRefType first, FrameRefType second)
{
RDCASSERT(eFrameRef_Minimum <= first && first <= eFrameRef_Maximum);
+2
View File
@@ -100,6 +100,8 @@ enum FrameRefType
const FrameRefType eFrameRef_Minimum = eFrameRef_None;
const FrameRefType eFrameRef_Maximum = eFrameRef_ReadBeforeWrite;
DECLARE_REFLECTION_ENUM(FrameRefType);
// Compose frame refs that occur in a known order.
// This can be thought of as a state (`first`) and a transition from that state
// (`second`), returning the new state (see the state diagram for