diff options
| author | Devin Doucette <[email protected]> | 2026-03-18 08:14:07 -0600 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-18 08:14:07 -0600 |
| commit | ee40d3387465b96058d33ed4d0e41d91a4ee1327 (patch) | |
| tree | 59361054b26ab9402abefdbc23d00fd61b4523ae /src | |
| parent | workaround for change in xmake behaviour around download file naming (#858) (diff) | |
| download | zen-ee40d3387465b96058d33ed4d0e41d91a4ee1327.tar.xz zen-ee40d3387465b96058d33ed4d0e41d91a4ee1327.zip | |
Add natvis for Compact Binary (#860)
Add natvis for Compact Binary
Includes natvis for DateTime, TimeSpan, IoHash, Guid, Oid.
Based on UE CL 51830581.
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencore/compactbinary.cpp | 29 | ||||
| -rw-r--r-- | src/zencore/compactbinarybuilder.cpp | 2 | ||||
| -rw-r--r-- | src/zencore/include/zencore/compactbinary.h | 94 | ||||
| -rw-r--r-- | src/zencore/xmake.lua | 1 | ||||
| -rw-r--r-- | src/zencore/zencore.natvis | 874 |
5 files changed, 1000 insertions, 0 deletions
diff --git a/src/zencore/compactbinary.cpp b/src/zencore/compactbinary.cpp index 9c81305d0..f2c46c2bc 100644 --- a/src/zencore/compactbinary.cpp +++ b/src/zencore/compactbinary.cpp @@ -1752,4 +1752,33 @@ TEST_SUITE_END(); #endif +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace CompactBinaryPrivate { + + ZEN_NOINLINE void ReferenceDebugTypes(DebugCb*, + DebugCbObject*, + DebugCbUniformObject*, + DebugCbArray*, + DebugCbUniformArray*, + DebugCbBinary*, + DebugCbString*, + DebugCbIntegerPositive*, + DebugCbIntegerNegative*, + DebugCbFloat32*, + DebugCbFloat64*, + DebugCbObjectAttachment*, + DebugCbBinaryAttachment*, + DebugCbHash*, + DebugCbUuid*, + DebugCbDateTime*, + DebugCbTimeSpan*, + DebugCbObjectId*, + DebugCbCustomById*, + DebugCbCustomByName*) + { + } + +} // namespace CompactBinaryPrivate + } // namespace zen diff --git a/src/zencore/compactbinarybuilder.cpp b/src/zencore/compactbinarybuilder.cpp index a9ba30750..a82ff5594 100644 --- a/src/zencore/compactbinarybuilder.cpp +++ b/src/zencore/compactbinarybuilder.cpp @@ -1449,6 +1449,8 @@ TEST_CASE("usonbuilder.complex") } Writer.EndArray(); + Writer.AddObjectId("Oid"sv, Oid::FromHexString("0102030405060708090a0b0c")); + Writer.EndObject(); Object = Writer.Save().AsObject(); } diff --git a/src/zencore/include/zencore/compactbinary.h b/src/zencore/include/zencore/compactbinary.h index b128e4205..74f4cdf8d 100644 --- a/src/zencore/include/zencore/compactbinary.h +++ b/src/zencore/include/zencore/compactbinary.h @@ -1530,4 +1530,98 @@ void uson_forcelink(); // internal void cbjson_forcelink(); // internal void cbyaml_forcelink(); // internal +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Types to support debug visualizers (natvis). + +// A field/array/object in memory can be visualized in a debugger supporting natvis by casting to this type. +// (DebugCb*)Pointer works for any field/array/object that starts with its field type. +struct DebugCb +{ +}; + +// Types that visualize a pointer to a value, *not* a pointer to a field. +struct DebugCbObject +{ +}; +struct DebugCbUniformObject +{ +}; +struct DebugCbArray +{ +}; +struct DebugCbUniformArray +{ +}; +struct DebugCbBinary +{ +}; +struct DebugCbString +{ +}; +struct DebugCbIntegerPositive +{ +}; +struct DebugCbIntegerNegative +{ +}; +struct DebugCbFloat32 +{ +}; +struct DebugCbFloat64 +{ +}; +struct DebugCbObjectAttachment +{ +}; +struct DebugCbBinaryAttachment +{ +}; +struct DebugCbHash +{ +}; +struct DebugCbUuid +{ +}; +struct DebugCbDateTime +{ +}; +struct DebugCbTimeSpan +{ +}; +struct DebugCbObjectId +{ +}; +struct DebugCbCustomById +{ +}; +struct DebugCbCustomByName +{ +}; + +namespace CompactBinaryPrivate { + + void ReferenceDebugTypes(DebugCb*, + DebugCbObject*, + DebugCbUniformObject*, + DebugCbArray*, + DebugCbUniformArray*, + DebugCbBinary*, + DebugCbString*, + DebugCbIntegerPositive*, + DebugCbIntegerNegative*, + DebugCbFloat32*, + DebugCbFloat64*, + DebugCbObjectAttachment*, + DebugCbBinaryAttachment*, + DebugCbHash*, + DebugCbUuid*, + DebugCbDateTime*, + DebugCbTimeSpan*, + DebugCbObjectId*, + DebugCbCustomById*, + DebugCbCustomByName*); + +} // namespace CompactBinaryPrivate + } // namespace zen diff --git a/src/zencore/xmake.lua b/src/zencore/xmake.lua index b08975df1..fe12c14e8 100644 --- a/src/zencore/xmake.lua +++ b/src/zencore/xmake.lua @@ -16,6 +16,7 @@ target('zencore') add_files("**.cpp") add_files("trace.cpp", {unity_ignored = true }) add_files("testing.cpp", {unity_ignored = true }) + add_extrafiles("zencore.natvis") if has_config("zenrpmalloc") then add_deps("rpmalloc") diff --git a/src/zencore/zencore.natvis b/src/zencore/zencore.natvis new file mode 100644 index 000000000..e2da28351 --- /dev/null +++ b/src/zencore/zencore.natvis @@ -0,0 +1,874 @@ +<?xml version="1.0" encoding="utf-8"?> +<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> + + <!-- Measure the length in bytes (1-9) of an encoded variable-length integer. See varint.h. --> + <Intrinsic Name="DebugMeasureVarUInt" Expression="(uint32_t)( + (*Data < 0x80) ? 1 : (*Data < 0xc0) ? 2 : (*Data < 0xe0) ? 3 : (*Data < 0xf0) ? 4 : + (*Data < 0xf8) ? 5 : (*Data < 0xfc) ? 6 : (*Data < 0xfe) ? 7 : (*Data == 0xfe) ? 8 : 9)"> + <Parameter Name="Data" Type="const uint8_t*"/> + </Intrinsic> + + <!-- Measure the number of bytes (1-9) required to encode an integer. See varint.h. --> + <Intrinsic Name="DebugMeasureVarUInt" Expression="(uint32_t)( + (Value < 0x000000000000007f) ? 1 : (Value < 0x0000000000003fff) ? 2 : + (Value < 0x00000000001fffff) ? 3 : (Value < 0x000000000fffffff) ? 4 : + (Value < 0x00000007ffffffff) ? 5 : (Value < 0x000003ffffffffff) ? 6 : + (Value < 0x0001ffffffffffff) ? 7 : (Value < 0x00ffffffffffffff) ? 8 : 9)"> + <Parameter Name="Value" Type="uint64_t"/> + </Intrinsic> + + <!-- Read a variable-length unsigned integer. See varint.h. --> + <Intrinsic Name="DebugReadVarUInt" Expression="(uint64_t)( + (*Data < 0x80) ? ((((uint64_t)Data[0]))) : + (*Data < 0xc0) ? ((((uint64_t)Data[0] & 0x3f) << 8) | ((uint64_t)Data[1])) : + (*Data < 0xe0) ? ((((uint64_t)Data[0] & 0x1f) << 16) | ((uint64_t)Data[1] << 8) | ((uint64_t)Data[2])) : + (*Data < 0xf0) ? ((((uint64_t)Data[0] & 0x0f) << 24) | ((uint64_t)Data[1] << 16) | ((uint64_t)Data[2] << 8) | ((uint64_t)Data[3])) : + (*Data < 0xf8) ? ((((uint64_t)Data[0] & 0x07) << 32) | ((uint64_t)Data[1] << 24) | ((uint64_t)Data[2] << 16) | ((uint64_t)Data[3] << 8) | ((uint64_t)Data[4])) : + (*Data < 0xfc) ? ((((uint64_t)Data[0] & 0x03) << 40) | ((uint64_t)Data[1] << 32) | ((uint64_t)Data[2] << 24) | ((uint64_t)Data[3] << 16) | ((uint64_t)Data[4] << 8) | ((uint64_t)Data[5])) : + (*Data < 0xfe) ? ((((uint64_t)Data[0] & 0x01) << 48) | ((uint64_t)Data[1] << 40) | ((uint64_t)Data[2] << 32) | ((uint64_t)Data[3] << 24) | ((uint64_t)Data[4] << 16) | ((uint64_t)Data[5] << 8) | ((uint64_t)Data[6])) : + (*Data < 0xff) ? ( ((uint64_t)Data[1] << 48) | ((uint64_t)Data[2] << 40) | ((uint64_t)Data[3] << 32) | ((uint64_t)Data[4] << 24) | ((uint64_t)Data[5] << 16) | ((uint64_t)Data[6] << 8) | ((uint64_t)Data[7])) : + ( ((uint64_t)Data[1] << 56) | ((uint64_t)Data[2] << 48) | ((uint64_t)Data[3] << 40) | ((uint64_t)Data[4] << 32) | ((uint64_t)Data[5] << 24) | ((uint64_t)Data[6] << 16) | ((uint64_t)Data[7] << 8) | ((uint64_t)Data[8])))"> + <Parameter Name="Data" Type="const uint8_t*"/> + </Intrinsic> + + <!-- Exact 2^Exp for Exp in the range [-1023, 1023], covering both float32 and float64. --> + <Intrinsic Name="Pow2i" Expression="(double)( + (Exp == 0) ? 1.0 : + (Exp > 0) + ? (((Exp & 1) ? 2.0 : 1.0) * + ((Exp & 2) ? 4.0 : 1.0) * + ((Exp & 4) ? 16.0 : 1.0) * + ((Exp & 8) ? 256.0 : 1.0) * + ((Exp & 16) ? 65536.0 : 1.0) * + ((Exp & 32) ? 4294967296.0 : 1.0) * + ((Exp & 64) ? 18446744073709551616.0 : 1.0) * + ((Exp & 128) ? 3.4028236692093846346337460743177e+38 : 1.0) * + ((Exp & 256) ? 1.1579208923731619542357098500869e+77 : 1.0) * + ((Exp & 512) ? 1.3407807929942597099574024998206e+154 : 1.0)) + : ((((-Exp) & 1) ? 0.5 : 1.0) * + (((-Exp) & 2) ? 0.25 : 1.0) * + (((-Exp) & 4) ? 0.0625 : 1.0) * + (((-Exp) & 8) ? 0.00390625 : 1.0) * + (((-Exp) & 16) ? 0.0000152587890625 : 1.0) * + (((-Exp) & 32) ? 2.3283064365386963e-10 : 1.0) * + (((-Exp) & 64) ? 5.421010862427522e-20 : 1.0) * + (((-Exp) & 128) ? 2.9387358770557187699218413430556e-39 : 1.0) * + (((-Exp) & 256) ? 8.6361685550944446253863518628004e-78 : 1.0) * + (((-Exp) & 512) ? 7.4583407312002067432909653154629e-155 : 1.0)))"> + <Parameter Name="Exp" Type="int32_t"/> + </Intrinsic> + + <Intrinsic Name="ByteSwap32" Expression="(uint32_t)(((Value & 0x000000ff) << 24) | ((Value & 0x0000ff00) << 8) | ((Value & 0x00ff0000) >> 8) | ((Value & 0xff000000) >> 24))"> + <Parameter Name="Value" Type="uint32_t"/> + </Intrinsic> + <Intrinsic Name="ByteSwap64" Expression="(uint64_t)(((uint64_t)ByteSwap32((uint32_t)Value) << 32) | (uint64_t)ByteSwap32((uint32_t)(Value >> 32)))"> + <Parameter Name="Value" Type="uint64_t"/> + </Intrinsic> + + <Intrinsic Name="Float32ExpBits" Expression="(uint32_t)((Value >> 23) & 0xff)"> + <Parameter Name="Value" Type="uint32_t"/> + </Intrinsic> + <Intrinsic Name="Float32FracBits" Expression="(uint32_t)(Value & 0x007fffff)"> + <Parameter Name="Value" Type="uint32_t"/> + </Intrinsic> + <Intrinsic Name="Float32Sign" Expression="(double)((Value & 0x80000000) ? -1.0 : 1.0)"> + <Parameter Name="Value" Type="uint32_t"/> + </Intrinsic> + + <Intrinsic Name="Float32FromBits" Expression="(float)( + ((Value & 0x7fffffff) == 0) ? ((Value & 0x80000000) ? -0.0 : 0.0) : + (Float32ExpBits(Value) == 0xff) + ? ((Float32FracBits(Value) != 0) ? (0.0 / 0.0) : ((Value & 0x80000000U) ? (-1.0 / 0.0) : (1.0 / 0.0))) + : (Float32Sign(Value) * + ((Float32ExpBits(Value) == 0) + ? ((float)Float32FracBits(Value) * 1.1920928955078125e-7 * Pow2i(-126)) + : ((1.0 + (float)Float32FracBits(Value) * 1.1920928955078125e-7) * Pow2i((int)Float32ExpBits(Value) - 127)) + )))"> + <Parameter Name="Value" Type="uint32_t"/> + </Intrinsic> + + <Intrinsic Name="Float64ExpBits" Expression="(uint32_t)((Value >> 52) & 0x7ff)"> + <Parameter Name="Value" Type="uint64_t"/> + </Intrinsic> + <Intrinsic Name="Float64FracBits" Expression="(uint64_t)(Value & 0x000fffffffffffff)"> + <Parameter Name="Value" Type="uint64_t"/> + </Intrinsic> + <Intrinsic Name="Float64Sign" Expression="(double)((Value & 0x8000000000000000) ? -1.0 : 1.0)"> + <Parameter Name="Value" Type="uint64_t"/> + </Intrinsic> + + <Intrinsic Name="Float64FromBits" Expression="(double)( + ((Value & 0x7fffffffffffffff) == 0) ? ((Value & 0x8000000000000000) ? -0.0 : 0.0) : + (Float64ExpBits(Value) == 0x7ff) + ? ((Float64FracBits(Value) != 0) ? (0.0 / 0.0) : ((Value & 0x8000000000000000) ? (-1.0 / 0.0) : (1.0 / 0.0))) + : (Float64Sign(Value) * + ((Float64ExpBits(Value) == 0) + ? ((double)Float64FracBits(Value) * 2.220446049250313e-16 * Pow2i(-1022)) + : ((1.0 + (double)Float64FracBits(Value) * 2.220446049250313e-16) * Pow2i((int)Float64ExpBits(Value) - 1023)) + )))"> + <Parameter Name="Value" Type="uint64_t"/> + </Intrinsic> + + <!-- Measure size in bytes of a compact binary field value. See CbFieldView::GetPayloadSize() in compactbinary.cpp. --> + <Intrinsic Name="MeasureCompactBinaryValue" Expression="(uint64_t)( + (Type == 0x00 || Type == 0x01) ? 0 : + (Type >= 0x02 && Type <= 0x07) ? (DebugMeasureVarUInt(Value) + DebugReadVarUInt(Value)) : + (Type == 0x08 || Type == 0x09) ? DebugMeasureVarUInt(Value) : + (Type == 0x0a) ? 4 : + (Type == 0x0b) ? 8 : + (Type == 0x0c || Type == 0x0d) ? 0 : + (Type == 0x0e || Type == 0x0f || Type == 0x10) ? 20 : + (Type == 0x11) ? 16 : + (Type == 0x12 || Type == 0x13) ? 8 : + (Type == 0x14) ? 12 : + (Type == 0x1e || Type == 0x1f) ? (DebugMeasureVarUInt(Value) + DebugReadVarUInt(Value)) : 0)"> + <Parameter Name="Value" Type="const uint8_t*"/> + <Parameter Name="Type" Type="uint8_t"/> + </Intrinsic> + + <Type Name="zen::CbFieldView"> + <Intrinsic Name="TypeValue" Expression="(uint8_t)((uint8_t)Type & 0x1f)"/> + <Expand> + <Item Name="[Value]" Condition="TypeValue() == 0x01">nullptr</Item> + <ExpandedItem Condition="TypeValue() == 0x02">*(zen::DebugCbObject*)Payload</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x03">*(zen::DebugCbUniformObject*)Payload</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x04">*(zen::DebugCbArray*)Payload</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x05">*(zen::DebugCbUniformArray*)Payload</ExpandedItem> + <Item Name="[Value]" Condition="TypeValue() == 0x06">*(zen::DebugCbBinary*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x07">*(zen::DebugCbString*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x08">*(zen::DebugCbIntegerPositive*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x09">*(zen::DebugCbIntegerNegative*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0a">*(zen::DebugCbFloat32*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0b">*(zen::DebugCbFloat64*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0c">false</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0d">true</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0e">*(zen::DebugCbObjectAttachment*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0f">*(zen::DebugCbBinaryAttachment*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x10">*(zen::DebugCbHash*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x11">*(zen::DebugCbUuid*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x12">*(zen::DebugCbDateTime*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x13">*(zen::DebugCbTimeSpan*)Payload</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x14">*(zen::DebugCbObjectId*)Payload</Item> + <ExpandedItem Condition="TypeValue() == 0x1e">*(zen::DebugCbCustomById*)Payload</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x1f">*(zen::DebugCbCustomByName*)Payload</ExpandedItem> + + <Item Name="[Name]" Condition="((uint8_t)Type & 0x80) != 0">*(zen::DebugCbString*)((const uint8_t*)Payload - NameLen - DebugMeasureVarUInt((uint64_t)NameLen))</Item> + <Item Name="[Type]">(zen::CbFieldType)TypeValue()</Item> + <Item Name="[Size]" Condition="TypeValue() != 0">1 + (((uint8_t)Type & 0x80) ? NameLen + DebugMeasureVarUInt((uint64_t)NameLen) : 0) + MeasureCompactBinaryValue((const uint8_t*)Payload, TypeValue())</Item> + <Item Name="[Error]" Condition="Error != zen::CbFieldError::None">Error</Item> + </Expand> + </Type> + + <Type Name="zen::DebugCb"> + <Intrinsic Name="TypeWithFlags" Expression="*(const uint8_t*)this"/> + <Intrinsic Name="TypeValue" Expression="(uint8_t)(TypeWithFlags() & 0x1f)"/> + <Intrinsic Name="HasName" Expression="(TypeWithFlags() & 0x80) != 0"/> + <Intrinsic Name="NameLenByteCount" Expression="HasName() ? DebugMeasureVarUInt((const uint8_t*)this + 1) : 0"/> + <Intrinsic Name="NameLen" Expression="HasName() ? DebugReadVarUInt((const uint8_t*)this + 1) : 0"/> + <Intrinsic Name="Value" Expression="(const uint8_t*)this + 1 + NameLenByteCount() + NameLen()"/> + <Expand HideRawView="true"> + <Item Name="[Value]" Condition="TypeValue() == 0x01">nullptr</Item> + <ExpandedItem Condition="TypeValue() == 0x02">*(zen::DebugCbObject*)Value()</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x03">*(zen::DebugCbUniformObject*)Value()</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x04">*(zen::DebugCbArray*)Value()</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x05">*(zen::DebugCbUniformArray*)Value()</ExpandedItem> + <Item Name="[Value]" Condition="TypeValue() == 0x06">*(zen::DebugCbBinary*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x07">*(zen::DebugCbString*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x08">*(zen::DebugCbIntegerPositive*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x09">*(zen::DebugCbIntegerNegative*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0a">*(zen::DebugCbFloat32*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0b">*(zen::DebugCbFloat64*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0c">false</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0d">true</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0e">*(zen::DebugCbObjectAttachment*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x0f">*(zen::DebugCbBinaryAttachment*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x10">*(zen::DebugCbHash*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x11">*(zen::DebugCbUuid*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x12">*(zen::DebugCbDateTime*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x13">*(zen::DebugCbTimeSpan*)Value()</Item> + <Item Name="[Value]" Condition="TypeValue() == 0x14">*(zen::DebugCbObjectId*)Value()</Item> + <ExpandedItem Condition="TypeValue() == 0x1e">*(zen::DebugCbCustomById*)Value()</ExpandedItem> + <ExpandedItem Condition="TypeValue() == 0x1f">*(zen::DebugCbCustomByName*)Value()</ExpandedItem> + + <Item Name="[Name]" Condition="HasName()">*(zen::DebugCbString*)((const uint8_t*)this + 1)</Item> + <Item Name="[Type]">(zen::CbFieldType)TypeValue()</Item> + <Item Name="[Size]">1 + NameLenByteCount() + NameLen() + MeasureCompactBinaryValue(Value(), TypeValue())</Item> + </Expand> + </Type> + + <Type Name="zen::DebugCbObject"> + <Intrinsic Name="ValueSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="ValueSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Expand HideRawView="true"> + <CustomListItems MaxItemsPerView="100"> + <Variable Name="Field" InitialValue="(const uint8_t*)this + ValueSizeByteCount()"/> + <Variable Name="FieldsEnd" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + ValueSize()"/> + <Variable Name="FieldType" InitialValue="(uint8_t)0"/> + <Variable Name="NameLenByteCount" InitialValue="(uint32_t)0"/> + <Variable Name="NameLen" InitialValue="(uint32_t)0"/> + <Variable Name="Name" InitialValue="(zen::DebugCbString*)nullptr"/> + <Variable Name="Value" InitialValue="(const uint8_t*)nullptr"/> + <Variable Name="ValueSize" InitialValue="(uint64_t)0"/> + <Loop Condition="Field < FieldsEnd"> + <!-- Decode --> + <Exec>FieldType = *Field & 0x1f</Exec> + <Exec>NameLenByteCount = DebugMeasureVarUInt(Field + 1)</Exec> + <Exec>NameLen = NameLenByteCount ? (uint32_t)DebugReadVarUInt(Field + 1) : 0</Exec> + <Exec>Name = (zen::DebugCbString*)(Field + 1)</Exec> + <Exec>Value = Field + 1 + NameLenByteCount + NameLen</Exec> + <Exec>ValueSize = MeasureCompactBinaryValue(Value, FieldType)</Exec> + <!-- Display --> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x01">nullptr</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x02">*(zen::DebugCbObject*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x03">*(zen::DebugCbUniformObject*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x04">*(zen::DebugCbArray*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x05">*(zen::DebugCbUniformArray*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x06">*(zen::DebugCbBinary*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x07">*(zen::DebugCbString*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x08">*(zen::DebugCbIntegerPositive*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x09">*(zen::DebugCbIntegerNegative*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x0a">*(zen::DebugCbFloat32*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x0b">*(zen::DebugCbFloat64*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x0c">false</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x0d">true</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x0e">*(zen::DebugCbObjectAttachment*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x0f">*(zen::DebugCbBinaryAttachment*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x10">*(zen::DebugCbHash*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x11">*(zen::DebugCbUuid*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x12">*(zen::DebugCbDateTime*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x13">*(zen::DebugCbTimeSpan*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x14">*(zen::DebugCbObjectId*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x1e">*(zen::DebugCbCustomById*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType == 0x1f">*(zen::DebugCbCustomByName*)Value</Item> + <!-- Advance --> + <Exec>Field = Value + ValueSize</Exec> + </Loop> + </CustomListItems> + </Expand> + </Type> + + <Type Name="zen::DebugCbUniformObject"> + <Intrinsic Name="ValueSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="ValueSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="FieldType" Expression="(uint8_t)*((const uint8_t*)this + ValueSizeByteCount()) & 0x1f"/> + <Expand HideRawView="true"> + <CustomListItems MaxItemsPerView="100"> + <Variable Name="Field" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + 1"/> + <Variable Name="FieldsEnd" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + ValueSize()"/> + <Variable Name="NameLenByteCount" InitialValue="(uint32_t)0"/> + <Variable Name="NameLen" InitialValue="(uint32_t)0"/> + <Variable Name="Name" InitialValue="(zen::DebugCbString*)nullptr"/> + <Variable Name="Value" InitialValue="(const uint8_t*)nullptr"/> + <Variable Name="ValueSize" InitialValue="(uint64_t)0"/> + <Loop Condition="Field < FieldsEnd"> + <!-- Decode --> + <Exec>NameLenByteCount = DebugMeasureVarUInt(Field)</Exec> + <Exec>NameLen = NameLenByteCount ? (uint32_t)DebugReadVarUInt(Field) : 0</Exec> + <Exec>Name = (zen::DebugCbString*)Field</Exec> + <Exec>Value = Field + NameLenByteCount + NameLen</Exec> + <Exec>ValueSize = MeasureCompactBinaryValue(Value, FieldType())</Exec> + <!-- Display --> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x01">nullptr</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x02">*(zen::DebugCbObject*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x03">*(zen::DebugCbUniformObject*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x04">*(zen::DebugCbArray*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x05">*(zen::DebugCbUniformArray*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x06">*(zen::DebugCbBinary*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x07">*(zen::DebugCbString*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x08">*(zen::DebugCbIntegerPositive*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x09">*(zen::DebugCbIntegerNegative*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x0a">*(zen::DebugCbFloat32*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x0b">*(zen::DebugCbFloat64*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x0c">false</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x0d">true</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x0e">*(zen::DebugCbObjectAttachment*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x0f">*(zen::DebugCbBinaryAttachment*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x10">*(zen::DebugCbHash*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x11">*(zen::DebugCbUuid*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x12">*(zen::DebugCbDateTime*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x13">*(zen::DebugCbTimeSpan*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x14">*(zen::DebugCbObjectId*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x1e">*(zen::DebugCbCustomById*)Value</Item> + <Item Name="{*Name,s8b}" Condition="FieldType() == 0x1f">*(zen::DebugCbCustomByName*)Value</Item> + <!-- Advance --> + <Exec>Field = Value + ValueSize</Exec> + </Loop> + </CustomListItems> + </Expand> + </Type> + + <Type Name="zen::DebugCbArray"> + <Intrinsic Name="ValueSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="ValueSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="FieldCountByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this + ValueSizeByteCount())"/> + <Intrinsic Name="FieldCount" Expression="DebugReadVarUInt((const uint8_t*)this + ValueSizeByteCount())"/> + <Expand HideRawView="true"> + <Item Name="[Count]">FieldCount()</Item> + <CustomListItems MaxItemsPerView="100"> + <Variable Name="Field" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + FieldCountByteCount()"/> + <Variable Name="FieldsEnd" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + ValueSize()"/> + <Variable Name="FieldType" InitialValue="(uint8_t)0"/> + <Variable Name="Value" InitialValue="(const uint8_t*)nullptr"/> + <Variable Name="ValueSize" InitialValue="(uint64_t)0"/> + <Variable Name="Index" InitialValue="0"/> + <Loop Condition="Field < FieldsEnd"> + <!-- Decode --> + <Exec>FieldType = *Field & 0x1f</Exec> + <Exec>Value = Field + 1</Exec> + <Exec>ValueSize = MeasureCompactBinaryValue(Value, FieldType)</Exec> + <!-- Display --> + <Item Name="[{Index}]" Condition="FieldType == 0x01">nullptr</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x02">*(zen::DebugCbObject*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x03">*(zen::DebugCbUniformObject*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x04">*(zen::DebugCbArray*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x05">*(zen::DebugCbUniformArray*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x06">*(zen::DebugCbBinary*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x07">*(zen::DebugCbString*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x08">*(zen::DebugCbIntegerPositive*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x09">*(zen::DebugCbIntegerNegative*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x0a">*(zen::DebugCbFloat32*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x0b">*(zen::DebugCbFloat64*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x0c">false</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x0d">true</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x0e">*(zen::DebugCbObjectAttachment*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x0f">*(zen::DebugCbBinaryAttachment*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x10">*(zen::DebugCbHash*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x11">*(zen::DebugCbUuid*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x12">*(zen::DebugCbDateTime*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x13">*(zen::DebugCbTimeSpan*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x14">*(zen::DebugCbObjectId*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x1e">*(zen::DebugCbCustomById*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType == 0x1f">*(zen::DebugCbCustomByName*)Value</Item> + <!-- Advance --> + <Exec>Field = Value + ValueSize</Exec> + <Exec>++Index</Exec> + </Loop> + </CustomListItems> + </Expand> + </Type> + + <Type Name="zen::DebugCbUniformArray"> + <Intrinsic Name="ValueSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="ValueSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="FieldCountByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this + ValueSizeByteCount())"/> + <Intrinsic Name="FieldCount" Expression="DebugReadVarUInt((const uint8_t*)this + ValueSizeByteCount())"/> + <Intrinsic Name="FieldType" Expression="(uint8_t)*((const uint8_t*)this + ValueSizeByteCount() + FieldCountByteCount()) & 0x1f"/> + <Expand HideRawView="true"> + <Item Name="[Count]">FieldCount()</Item> + <CustomListItems MaxItemsPerView="100"> + <Variable Name="Field" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + FieldCountByteCount() + 1"/> + <Variable Name="FieldsEnd" InitialValue="(const uint8_t*)this + ValueSizeByteCount() + ValueSize()"/> + <Variable Name="Value" InitialValue="(const uint8_t*)nullptr"/> + <Variable Name="ValueSize" InitialValue="(uint64_t)0"/> + <Variable Name="Index" InitialValue="0"/> + <Loop Condition="Field < FieldsEnd"> + <!-- Decode --> + <Exec>Value = Field</Exec> + <Exec>ValueSize = MeasureCompactBinaryValue(Value, FieldType())</Exec> + <!-- Display --> + <Item Name="[{Index}]" Condition="FieldType() == 0x01">nullptr</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x02">*(zen::DebugCbObject*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x03">*(zen::DebugCbUniformObject*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x04">*(zen::DebugCbArray*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x05">*(zen::DebugCbUniformArray*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x06">*(zen::DebugCbBinary*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x07">*(zen::DebugCbString*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x08">*(zen::DebugCbIntegerPositive*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x09">*(zen::DebugCbIntegerNegative*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x0a">*(zen::DebugCbFloat32*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x0b">*(zen::DebugCbFloat64*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x0c">false</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x0d">true</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x0e">*(zen::DebugCbObjectAttachment*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x0f">*(zen::DebugCbBinaryAttachment*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x10">*(zen::DebugCbHash*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x11">*(zen::DebugCbUuid*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x12">*(zen::DebugCbDateTime*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x13">*(zen::DebugCbTimeSpan*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x14">*(zen::DebugCbObjectId*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x1e">*(zen::DebugCbCustomById*)Value</Item> + <Item Name="[{Index}]" Condition="FieldType() == 0x1f">*(zen::DebugCbCustomByName*)Value</Item> + <!-- Advance --> + <Exec>Field = Value + ValueSize</Exec> + <Exec>++Index</Exec> + </Loop> + </CustomListItems> + </Expand> + </Type> + + <Type Name="zen::DebugCbBinary"> + <Intrinsic Name="ValueSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="ValueSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Expand HideRawView="true"> + <Item Name="[Size]">ValueSize()</Item> + <IndexListItems> + <Size>ValueSize()</Size> + <ValueNode>((const uint8_t*)this + ValueSizeByteCount())[$i]</ValueNode> + </IndexListItems> + </Expand> + </Type> + + <Type Name="zen::DebugCbString"> + <Intrinsic Name="ValueLenByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="ValueLen" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <DisplayString>{((const char8_t*)this + ValueLenByteCount()),[ValueLen()]s8}</DisplayString> + <StringView>((const char8_t*)this + ValueLenByteCount()),[ValueLen()]s8</StringView> + <Expand HideRawView="true"> + <Item Name="[Size]">ValueLen()</Item> + <IndexListItems> + <Size>ValueLen()</Size> + <ValueNode>((const char8_t*)this + ValueLenByteCount())[$i]</ValueNode> + </IndexListItems> + </Expand> + </Type> + + <Type Name="zen::DebugCbIntegerPositive"> + <DisplayString>{DebugReadVarUInt((const uint8_t*)this)}</DisplayString> + </Type> + + <Type Name="zen::DebugCbIntegerNegative"> + <DisplayString>{-(int64_t)DebugReadVarUInt((const uint8_t*)this) - 1}</DisplayString> + </Type> + + <Type Name="zen::DebugCbFloat32"> + <DisplayString>{Float32FromBits(ByteSwap32(*(uint32_t*)this))}</DisplayString> + </Type> + + <Type Name="zen::DebugCbFloat64"> + <DisplayString>{Float64FromBits(ByteSwap64(*(uint64_t*)this))}</DisplayString> + </Type> + + <Type Name="zen::DebugCbObjectAttachment"> + <DisplayString>{*(const zen::IoHash*)this}</DisplayString> + </Type> + + <Type Name="zen::DebugCbBinaryAttachment"> + <DisplayString>{*(const zen::IoHash*)this}</DisplayString> + </Type> + + <Type Name="zen::DebugCbHash"> + <DisplayString>{*(const zen::IoHash*)this}</DisplayString> + </Type> + + <Type Name="zen::DebugCbUuid"> + <DisplayString>{*(const zen::Guid*)this}</DisplayString> + </Type> + + <Type Name="zen::DebugCbDateTime"> + <!-- 100ns ticks since 0001-01-01 00:00:00.0000000 --> + <Intrinsic Name="RawTicks" Expression="(int64_t)ByteSwap64(*(uint64_t*)this)"/> + + <Intrinsic Name="TicksPerMillisecond" Expression="10000ll"/> + <Intrinsic Name="TicksPerSecond" Expression="10000000ll"/> + <Intrinsic Name="TicksPerMinute" Expression="600000000ll"/> + <Intrinsic Name="TicksPerHour" Expression="36000000000ll"/> + <Intrinsic Name="TicksPerDay" Expression="864000000000ll"/> + + <Intrinsic Name="DayNumber" Expression="RawTicks() / TicksPerDay()"/> + <Intrinsic Name="TimeOfDayTicks" Expression="RawTicks() % TicksPerDay()"/> + + <Intrinsic Name="Y400" Expression="DayNumber() / 146097"/> + <Intrinsic Name="R400" Expression="DayNumber() % 146097"/> + <Intrinsic Name="Y100Raw" Expression="R400() / 36524"/> + <Intrinsic Name="Y100" Expression="Y100Raw() > 3 ? 3 : Y100Raw()"/> + <Intrinsic Name="R100" Expression="R400() - (Y100() * 36524)"/> + <Intrinsic Name="Y4" Expression="R100() / 1461"/> + <Intrinsic Name="R4" Expression="R100() % 1461"/> + <Intrinsic Name="Y1Raw" Expression="R4() / 365"/> + <Intrinsic Name="Y1" Expression="Y1Raw() > 3 ? 3 : Y1Raw()"/> + + <Intrinsic Name="Year" Expression="(int)(Y400() * 400 + Y100() * 100 + Y4() * 4 + Y1() + 1)"/> + <Intrinsic Name="DayOfYear" Expression="(int)(R4() - Y1() * 365)"/> + <Intrinsic Name="IsLeapYear" Expression="((Year() % 4) == 0) && (((Year() % 100) != 0) || ((Year() % 400) == 0))"/> + + <Intrinsic Name="Month" Expression=" + IsLeapYear() + ? ( DayOfYear() < 31 ? 1 + : DayOfYear() < 60 ? 2 + : DayOfYear() < 91 ? 3 + : DayOfYear() < 121 ? 4 + : DayOfYear() < 152 ? 5 + : DayOfYear() < 182 ? 6 + : DayOfYear() < 213 ? 7 + : DayOfYear() < 244 ? 8 + : DayOfYear() < 274 ? 9 + : DayOfYear() < 305 ? 10 + : DayOfYear() < 335 ? 11 : 12) + : ( DayOfYear() < 31 ? 1 + : DayOfYear() < 59 ? 2 + : DayOfYear() < 90 ? 3 + : DayOfYear() < 120 ? 4 + : DayOfYear() < 151 ? 5 + : DayOfYear() < 181 ? 6 + : DayOfYear() < 212 ? 7 + : DayOfYear() < 243 ? 8 + : DayOfYear() < 273 ? 9 + : DayOfYear() < 304 ? 10 + : DayOfYear() < 334 ? 11 : 12)"/> + + <Intrinsic Name="Day" Expression=" + IsLeapYear() + ? ( DayOfYear() < 31 ? DayOfYear() + 1 + : DayOfYear() < 60 ? DayOfYear() - 31 + 1 + : DayOfYear() < 91 ? DayOfYear() - 60 + 1 + : DayOfYear() < 121 ? DayOfYear() - 91 + 1 + : DayOfYear() < 152 ? DayOfYear() - 121 + 1 + : DayOfYear() < 182 ? DayOfYear() - 152 + 1 + : DayOfYear() < 213 ? DayOfYear() - 182 + 1 + : DayOfYear() < 244 ? DayOfYear() - 213 + 1 + : DayOfYear() < 274 ? DayOfYear() - 244 + 1 + : DayOfYear() < 305 ? DayOfYear() - 274 + 1 + : DayOfYear() < 335 ? DayOfYear() - 305 + 1 + : DayOfYear() - 335 + 1) + : ( DayOfYear() < 31 ? DayOfYear() + 1 + : DayOfYear() < 59 ? DayOfYear() - 31 + 1 + : DayOfYear() < 90 ? DayOfYear() - 59 + 1 + : DayOfYear() < 120 ? DayOfYear() - 90 + 1 + : DayOfYear() < 151 ? DayOfYear() - 120 + 1 + : DayOfYear() < 181 ? DayOfYear() - 151 + 1 + : DayOfYear() < 212 ? DayOfYear() - 181 + 1 + : DayOfYear() < 243 ? DayOfYear() - 212 + 1 + : DayOfYear() < 273 ? DayOfYear() - 243 + 1 + : DayOfYear() < 304 ? DayOfYear() - 273 + 1 + : DayOfYear() < 334 ? DayOfYear() - 304 + 1 + : DayOfYear() - 334 + 1)"/> + + <Intrinsic Name="Hour" Expression="(int32_t)(TimeOfDayTicks() / TicksPerHour())"/> + <Intrinsic Name="Minute" Expression="(int32_t)((TimeOfDayTicks() % TicksPerHour()) / TicksPerMinute())"/> + <Intrinsic Name="Second" Expression="(int32_t)((TimeOfDayTicks() % TicksPerMinute()) / TicksPerSecond())"/> + <Intrinsic Name="Millisecond" Expression="(int32_t)((TimeOfDayTicks() % TicksPerSecond()) / TicksPerMillisecond())"/> + <Intrinsic Name="SubMs100ns" Expression="(int32_t)(TimeOfDayTicks() % TicksPerMillisecond())"/> + + <DisplayString>{Year()}-{Month()}-{Day()} {Hour()}:{Minute()}:{Second()} {Millisecond()}ms</DisplayString> + <Expand HideRawView="true"> + <Item Name="[Ticks] (100ns)">RawTicks()</Item> + <Item Name="[Year]">Year()</Item> + <Item Name="[Month]">Month()</Item> + <Item Name="[Day]">Day()</Item> + <Item Name="[Hour]">Hour()</Item> + <Item Name="[Minute]">Minute()</Item> + <Item Name="[Second]">Second()</Item> + <Item Name="[Millisecond]">Millisecond()</Item> + <Item Name="[100ns Remainder]">SubMs100ns()</Item> + </Expand> + </Type> + + <Type Name="zen::DebugCbTimeSpan"> + <Intrinsic Name="RawTicks" Expression="(int64_t)ByteSwap64(*(uint64_t*)this)"/> + <Intrinsic Name="AbsTicks" Expression="RawTicks() < 0 ? -RawTicks() : RawTicks()"/> + + <Intrinsic Name="TicksPerMillisecond" Expression="10000ll"/> + <Intrinsic Name="TicksPerSecond" Expression="10000000ll"/> + <Intrinsic Name="TicksPerMinute" Expression="600000000ll"/> + <Intrinsic Name="TicksPerHour" Expression="36000000000ll"/> + <Intrinsic Name="TicksPerDay" Expression="864000000000ll"/> + + <Intrinsic Name="Days" Expression="(int64_t)(AbsTicks() / TicksPerDay())"/> + <Intrinsic Name="Hours" Expression="(int32_t)((AbsTicks() % TicksPerDay()) / TicksPerHour())"/> + <Intrinsic Name="Minutes" Expression="(int32_t)((AbsTicks() % TicksPerHour()) / TicksPerMinute())"/> + <Intrinsic Name="Seconds" Expression="(int32_t)((AbsTicks() % TicksPerMinute()) / TicksPerSecond())"/> + <Intrinsic Name="Milliseconds" Expression="(int32_t)((AbsTicks() % TicksPerSecond()) / TicksPerMillisecond())"/> + <Intrinsic Name="SubMs100ns" Expression="(int32_t)(AbsTicks() % TicksPerMillisecond())"/> + + <DisplayString Condition="RawTicks() < 0">-{Days()}d {Hours()}h{Minutes()}m{Seconds()}s {Milliseconds()}ms</DisplayString> + <DisplayString>{Days()}d {Hours()}h{Minutes()}m{Seconds()}s {Milliseconds()}ms</DisplayString> + <Expand HideRawView="true"> + <Item Name="[Ticks] (100ns)">RawTicks()</Item> + <Item Name="[Days]">Days()</Item> + <Item Name="[Hours]">Hours()</Item> + <Item Name="[Minutes]">Minutes()</Item> + <Item Name="[Seconds]">Seconds()</Item> + <Item Name="[Milliseconds]">Milliseconds()</Item> + <Item Name="[100ns Remainder]">SubMs100ns()</Item> + <Item Name="[Total Milliseconds]">(double)RawTicks() / TicksPerMillisecond()</Item> + <Item Name="[Total Seconds]">(double)RawTicks() / TicksPerSecond()</Item> + <Item Name="[Total Minutes]">(double)RawTicks() / TicksPerMinute()</Item> + <Item Name="[Total Hours]">(double)RawTicks() / TicksPerHour()</Item> + <Item Name="[Total Days]">(double)RawTicks() / TicksPerDay()</Item> + </Expand> + </Type> + + <Type Name="zen::DebugCbObjectId"> + <DisplayString>{*(const zen::Oid*)this}</DisplayString> + </Type> + + <Type Name="zen::DebugCbCustomById"> + <Intrinsic Name="TotalSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="TotalSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="TypeIdByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this + TotalSizeByteCount())"/> + <Intrinsic Name="TypeId" Expression="DebugReadVarUInt((const uint8_t*)this + TotalSizeByteCount())"/> + <Intrinsic Name="Value" Expression="(const uint8_t*)this + TotalSizeByteCount() + TypeIdByteCount()"/> + <Intrinsic Name="ValueSize" Expression="TotalSize() - TypeIdByteCount()"/> + <Expand HideRawView="true"> + <Item Name="[TypeId]">TypeId()</Item> + <Item Name="[Value]">Value(),[ValueSize()]</Item> + </Expand> + </Type> + + <Type Name="zen::DebugCbCustomByName"> + <Intrinsic Name="TotalSizeByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="TotalSize" Expression="DebugReadVarUInt((const uint8_t*)this)"/> + <Intrinsic Name="TypeNameLenByteCount" Expression="DebugMeasureVarUInt((const uint8_t*)this + TotalSizeByteCount())"/> + <Intrinsic Name="TypeNameLen" Expression="DebugReadVarUInt((const uint8_t*)this + TotalSizeByteCount())"/> + <Intrinsic Name="TypeName" Expression="(const uint8_t*)this + TotalSizeByteCount() + TypeNameLenByteCount()"/> + <Intrinsic Name="Value" Expression="TypeName() + TypeNameLen()"/> + <Intrinsic Name="ValueSize" Expression="TotalSize() - TypeNameLenByteCount() - TypeNameLen()"/> + <Expand HideRawView="true"> + <Item Name="[TypeName]">TypeName(),[TypeNameLen()]s8</Item> + <Item Name="[Value]">Value(),[ValueSize()]</Item> + </Expand> + </Type> + + <Type Name="zen::TCbFieldIterator<*>"> + <Intrinsic Name="NameFromField" Expression="Field + (((uint8_t)Type & 0x40) ? 1 : 0)"> + <Parameter Name="Field" Type="const uint8_t*"/> + <Parameter Name="Type" Type="zen::CbFieldType"/> + </Intrinsic> + <Intrinsic Name="ValueFromName" Expression="Name + (((uint8_t)Type & 0x80) ? DebugMeasureVarUInt(Name) + DebugReadVarUInt(Name) : 0)"> + <Parameter Name="Name" Type="const uint8_t*"/> + <Parameter Name="Type" Type="zen::CbFieldType"/> + </Intrinsic> + <Intrinsic Name="ValueFromField" Expression="ValueFromName(NameFromField(Field, Type), Type)"> + <Parameter Name="Field" Type="const uint8_t*"/> + <Parameter Name="Type" Type="zen::CbFieldType"/> + </Intrinsic> + <Intrinsic Name="NextFieldFromValue" Expression="Value + MeasureCompactBinaryValue(Value, (uint8_t)Type & 0x1f)"> + <Parameter Name="Value" Type="const uint8_t*"/> + <Parameter Name="Type" Type="zen::CbFieldType"/> + </Intrinsic> + <DisplayString Condition="!FieldsEnd">Empty</DisplayString> + <Expand> + <ExpandedItem Condition="!!FieldsEnd">*($T1*)this</ExpandedItem> + <Synthetic Name="[Remaining]" Condition="!!FieldsEnd"> + <DisplayString Condition="NextFieldFromValue((const uint8_t*)Payload, Type) >= FieldsEnd">Empty</DisplayString> + <Expand> + <CustomListItems> + <Variable Name="FieldType" InitialValue="Type"/> + <Variable Name="Field" InitialValue="NextFieldFromValue((const uint8_t*)Payload, Type)"/> + <Variable Name="Value" InitialValue="(const uint8_t*)nullptr"/> + <Variable Name="Index" InitialValue="(uint32_t)0"/> + <Variable Name="NameLen" InitialValue="(uint32_t)0"/> + <Variable Name="Name" InitialValue="(const uint8_t*)nullptr"/> + <Loop Condition="Field < FieldsEnd"> + <!-- Decode --> + <Exec>FieldType = ((uint8_t)Type & 0x40) ? (zen::CbFieldType)*Field : Type</Exec> + <Exec>Name = NameFromField(Field, FieldType)</Exec> + <Exec>NameLen = ((uint8_t)FieldType & 0x80) ? (uint32_t)DebugReadVarUInt(Name) : 0</Exec> + <Exec>Value = ValueFromField(Field, FieldType)</Exec> + <!-- Display Name and Index --> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x81">nullptr</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x82">*(zen::DebugCbObject*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x83">*(zen::DebugCbUniformObject*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x84">*(zen::DebugCbArray*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x85">*(zen::DebugCbUniformArray*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x86">*(zen::DebugCbBinary*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x87">*(zen::DebugCbString*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x88">*(zen::DebugCbIntegerPositive*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x89">*(zen::DebugCbIntegerNegative*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x8a">*(zen::DebugCbFloat32*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x8b">*(zen::DebugCbFloat64*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x8c">false</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x8d">true</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x8e">*(zen::DebugCbObjectAttachment*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x8f">*(zen::DebugCbBinaryAttachment*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x90">*(zen::DebugCbHash*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x91">*(zen::DebugCbUuid*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x92">*(zen::DebugCbDateTime*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x93">*(zen::DebugCbTimeSpan*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x94">*(zen::DebugCbObjectId*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x9e">*(zen::DebugCbCustomById*)Value</Item> + <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType & 0x9f) == 0x9f">*(zen::DebugCbCustomByName*)Value</Item> + <!-- Display Index Only --> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x01">nullptr</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x02">*(zen::DebugCbObject*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x03">*(zen::DebugCbUniformObject*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x04">*(zen::DebugCbArray*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x05">*(zen::DebugCbUniformArray*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x06">*(zen::DebugCbBinary*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x07">*(zen::DebugCbString*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x08">*(zen::DebugCbIntegerPositive*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x09">*(zen::DebugCbIntegerNegative*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x0a">*(zen::DebugCbFloat32*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x0b">*(zen::DebugCbFloat64*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x0c">false</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x0d">true</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x0e">*(zen::DebugCbObjectAttachment*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x0f">*(zen::DebugCbBinaryAttachment*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x10">*(zen::DebugCbHash*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x11">*(zen::DebugCbUuid*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x12">*(zen::DebugCbDateTime*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x13">*(zen::DebugCbTimeSpan*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x14">*(zen::DebugCbObjectId*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x1e">*(zen::DebugCbCustomById*)Value</Item> + <Item Name="[{Index}]" Condition="((uint8_t)FieldType & 0x9f) == 0x1f">*(zen::DebugCbCustomByName*)Value</Item> + <!-- Advance --> + <Exec>++Index</Exec> + <Exec>Field = NextFieldFromValue(Value, FieldType)</Exec> + </Loop> + </CustomListItems> + </Expand> + </Synthetic> + </Expand> + </Type> + + <Type Name="zen::DateTime"> + <Intrinsic Name="RawTicks" Expression="Ticks"/> + + <Intrinsic Name="TicksPerMillisecond" Expression="10000ll"/> + <Intrinsic Name="TicksPerSecond" Expression="10000000ll"/> + <Intrinsic Name="TicksPerMinute" Expression="600000000ll"/> + <Intrinsic Name="TicksPerHour" Expression="36000000000ll"/> + <Intrinsic Name="TicksPerDay" Expression="864000000000ll"/> + + <Intrinsic Name="DayNumber" Expression="RawTicks() / TicksPerDay()"/> + <Intrinsic Name="TimeOfDayTicks" Expression="RawTicks() % TicksPerDay()"/> + + <Intrinsic Name="Y400" Expression="DayNumber() / 146097"/> + <Intrinsic Name="R400" Expression="DayNumber() % 146097"/> + <Intrinsic Name="Y100Raw" Expression="R400() / 36524"/> + <Intrinsic Name="Y100" Expression="Y100Raw() > 3 ? 3 : Y100Raw()"/> + <Intrinsic Name="R100" Expression="R400() - (Y100() * 36524)"/> + <Intrinsic Name="Y4" Expression="R100() / 1461"/> + <Intrinsic Name="R4" Expression="R100() % 1461"/> + <Intrinsic Name="Y1Raw" Expression="R4() / 365"/> + <Intrinsic Name="Y1" Expression="Y1Raw() > 3 ? 3 : Y1Raw()"/> + + <Intrinsic Name="Year" Expression="(int)(Y400() * 400 + Y100() * 100 + Y4() * 4 + Y1() + 1)"/> + <Intrinsic Name="DayOfYear" Expression="(int)(R4() - Y1() * 365)"/> + <Intrinsic Name="IsLeapYear" Expression="((Year() % 4) == 0) && (((Year() % 100) != 0) || ((Year() % 400) == 0))"/> + + <Intrinsic Name="Month" Expression=" + IsLeapYear() + ? ( DayOfYear() < 31 ? 1 + : DayOfYear() < 60 ? 2 + : DayOfYear() < 91 ? 3 + : DayOfYear() < 121 ? 4 + : DayOfYear() < 152 ? 5 + : DayOfYear() < 182 ? 6 + : DayOfYear() < 213 ? 7 + : DayOfYear() < 244 ? 8 + : DayOfYear() < 274 ? 9 + : DayOfYear() < 305 ? 10 + : DayOfYear() < 335 ? 11 : 12) + : ( DayOfYear() < 31 ? 1 + : DayOfYear() < 59 ? 2 + : DayOfYear() < 90 ? 3 + : DayOfYear() < 120 ? 4 + : DayOfYear() < 151 ? 5 + : DayOfYear() < 181 ? 6 + : DayOfYear() < 212 ? 7 + : DayOfYear() < 243 ? 8 + : DayOfYear() < 273 ? 9 + : DayOfYear() < 304 ? 10 + : DayOfYear() < 334 ? 11 : 12)"/> + + <Intrinsic Name="Day" Expression=" + IsLeapYear() + ? ( DayOfYear() < 31 ? DayOfYear() + 1 + : DayOfYear() < 60 ? DayOfYear() - 31 + 1 + : DayOfYear() < 91 ? DayOfYear() - 60 + 1 + : DayOfYear() < 121 ? DayOfYear() - 91 + 1 + : DayOfYear() < 152 ? DayOfYear() - 121 + 1 + : DayOfYear() < 182 ? DayOfYear() - 152 + 1 + : DayOfYear() < 213 ? DayOfYear() - 182 + 1 + : DayOfYear() < 244 ? DayOfYear() - 213 + 1 + : DayOfYear() < 274 ? DayOfYear() - 244 + 1 + : DayOfYear() < 305 ? DayOfYear() - 274 + 1 + : DayOfYear() < 335 ? DayOfYear() - 305 + 1 + : DayOfYear() - 335 + 1) + : ( DayOfYear() < 31 ? DayOfYear() + 1 + : DayOfYear() < 59 ? DayOfYear() - 31 + 1 + : DayOfYear() < 90 ? DayOfYear() - 59 + 1 + : DayOfYear() < 120 ? DayOfYear() - 90 + 1 + : DayOfYear() < 151 ? DayOfYear() - 120 + 1 + : DayOfYear() < 181 ? DayOfYear() - 151 + 1 + : DayOfYear() < 212 ? DayOfYear() - 181 + 1 + : DayOfYear() < 243 ? DayOfYear() - 212 + 1 + : DayOfYear() < 273 ? DayOfYear() - 243 + 1 + : DayOfYear() < 304 ? DayOfYear() - 273 + 1 + : DayOfYear() < 334 ? DayOfYear() - 304 + 1 + : DayOfYear() - 334 + 1)"/> + + <Intrinsic Name="Hour" Expression="(int32_t)(TimeOfDayTicks() / TicksPerHour())"/> + <Intrinsic Name="Minute" Expression="(int32_t)((TimeOfDayTicks() % TicksPerHour()) / TicksPerMinute())"/> + <Intrinsic Name="Second" Expression="(int32_t)((TimeOfDayTicks() % TicksPerMinute()) / TicksPerSecond())"/> + <Intrinsic Name="Millisecond" Expression="(int32_t)((TimeOfDayTicks() % TicksPerSecond()) / TicksPerMillisecond())"/> + <Intrinsic Name="SubMs100ns" Expression="(int32_t)(TimeOfDayTicks() % TicksPerMillisecond())"/> + + <DisplayString>{Year()}-{Month()}-{Day()} {Hour()}:{Minute()}:{Second()} {Millisecond()}ms</DisplayString> + <Expand> + <Item Name="Ticks">Ticks</Item> + <Item Name="[Year]">Year()</Item> + <Item Name="[Month]">Month()</Item> + <Item Name="[Day]">Day()</Item> + <Item Name="[Hour]">Hour()</Item> + <Item Name="[Minute]">Minute()</Item> + <Item Name="[Second]">Second()</Item> + <Item Name="[Millisecond]">Millisecond()</Item> + <Item Name="[100ns Remainder]">SubMs100ns()</Item> + </Expand> + </Type> + + <Type Name="zen::TimeSpan"> + <Intrinsic Name="RawTicks" Expression="Ticks"/> + <Intrinsic Name="AbsTicks" Expression="RawTicks() < 0 ? -RawTicks() : RawTicks()"/> + + <Intrinsic Name="TicksPerMillisecond" Expression="10000ll"/> + <Intrinsic Name="TicksPerSecond" Expression="10000000ll"/> + <Intrinsic Name="TicksPerMinute" Expression="600000000ll"/> + <Intrinsic Name="TicksPerHour" Expression="36000000000ll"/> + <Intrinsic Name="TicksPerDay" Expression="864000000000ll"/> + + <Intrinsic Name="Days" Expression="(int64_t)(AbsTicks() / TicksPerDay())"/> + <Intrinsic Name="Hours" Expression="(int32_t)((AbsTicks() % TicksPerDay()) / TicksPerHour())"/> + <Intrinsic Name="Minutes" Expression="(int32_t)((AbsTicks() % TicksPerHour()) / TicksPerMinute())"/> + <Intrinsic Name="Seconds" Expression="(int32_t)((AbsTicks() % TicksPerMinute()) / TicksPerSecond())"/> + <Intrinsic Name="Milliseconds" Expression="(int32_t)((AbsTicks() % TicksPerSecond()) / TicksPerMillisecond())"/> + <Intrinsic Name="SubMs100ns" Expression="(int32_t)(AbsTicks() % TicksPerMillisecond())"/> + + <DisplayString Condition="RawTicks() < 0">-{Days()}d {Hours()}h{Minutes()}m{Seconds()}s {Milliseconds()}ms</DisplayString> + <DisplayString>{Days()}d {Hours()}h{Minutes()}m{Seconds()}s {Milliseconds()}ms</DisplayString> + <Expand> + <Item Name="Ticks">Ticks</Item> + <Item Name="[Days]">Days()</Item> + <Item Name="[Hours]">Hours()</Item> + <Item Name="[Minutes]">Minutes()</Item> + <Item Name="[Seconds]">Seconds()</Item> + <Item Name="[Milliseconds]">Milliseconds()</Item> + <Item Name="[100ns Remainder]">SubMs100ns()</Item> + <Item Name="[Total Milliseconds]">(double)RawTicks() / TicksPerMillisecond()</Item> + <Item Name="[Total Seconds]">(double)RawTicks() / TicksPerSecond()</Item> + <Item Name="[Total Minutes]">(double)RawTicks() / TicksPerMinute()</Item> + <Item Name="[Total Hours]">(double)RawTicks() / TicksPerHour()</Item> + <Item Name="[Total Days]">(double)RawTicks() / TicksPerDay()</Item> + </Expand> + </Type> + + <Type Name="zen::IoHash"> + <DisplayString>{uint32_t(Hash[0]<<24 | Hash[1]<<16 | Hash[2]<<8 | Hash[3]),xb}{uint32_t(Hash[4]<<24 | Hash[5]<<16 | Hash[6]<<8 | Hash[7]),xb}{uint32_t(Hash[8]<<24 | Hash[9]<<16 | Hash[10]<<8 | Hash[11]),xb}{uint32_t(Hash[12]<<24 | Hash[13]<<16 | Hash[14]<<8 | Hash[15]),xb}{uint32_t(Hash[16]<<24 | Hash[17]<<16 | Hash[18]<<8 | Hash[19]),xb}</DisplayString> + <Expand> + <IndexListItems> + <Size>sizeof(Hash)</Size> + <ValueNode>Hash[$i]</ValueNode> + </IndexListItems> + </Expand> + </Type> + + <Type Name="zen::Guid"> + <DisplayString>{{{A,xb}-{(uint16_t)(B >> 16),xb}-{(uint16_t)B,xb}-{(uint16_t)(C >> 16),xb}-{(uint16_t)C,xb}{D,xb}}}</DisplayString> + <Expand> + <Item Name="A">A,x</Item> + <Item Name="B">B,x</Item> + <Item Name="C">C,x</Item> + <Item Name="D">D,x</Item> + </Expand> + </Type> + + <Type Name="zen::Oid"> + <DisplayString>{ByteSwap32(OidBits[0]),xb}{ByteSwap32(OidBits[1]),xb}{ByteSwap32(OidBits[2]),xb}</DisplayString> + <Expand> + <ExpandedItem>OidBits</ExpandedItem> + </Expand> + </Type> + +</AutoVisualizer> |