aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDevin Doucette <[email protected]>2026-03-18 08:14:07 -0600
committerGitHub Enterprise <[email protected]>2026-03-18 08:14:07 -0600
commitee40d3387465b96058d33ed4d0e41d91a4ee1327 (patch)
tree59361054b26ab9402abefdbc23d00fd61b4523ae /src
parentworkaround for change in xmake behaviour around download file naming (#858) (diff)
downloadzen-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.cpp29
-rw-r--r--src/zencore/compactbinarybuilder.cpp2
-rw-r--r--src/zencore/include/zencore/compactbinary.h94
-rw-r--r--src/zencore/xmake.lua1
-rw-r--r--src/zencore/zencore.natvis874
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 &lt; 0x80) ? 1 : (*Data &lt; 0xc0) ? 2 : (*Data &lt; 0xe0) ? 3 : (*Data &lt; 0xf0) ? 4 :
+ (*Data &lt; 0xf8) ? 5 : (*Data &lt; 0xfc) ? 6 : (*Data &lt; 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 &lt; 0x000000000000007f) ? 1 : (Value &lt; 0x0000000000003fff) ? 2 :
+ (Value &lt; 0x00000000001fffff) ? 3 : (Value &lt; 0x000000000fffffff) ? 4 :
+ (Value &lt; 0x00000007ffffffff) ? 5 : (Value &lt; 0x000003ffffffffff) ? 6 :
+ (Value &lt; 0x0001ffffffffffff) ? 7 : (Value &lt; 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 &lt; 0x80) ? ((((uint64_t)Data[0]))) :
+ (*Data &lt; 0xc0) ? ((((uint64_t)Data[0] &amp; 0x3f) &lt;&lt; 8) | ((uint64_t)Data[1])) :
+ (*Data &lt; 0xe0) ? ((((uint64_t)Data[0] &amp; 0x1f) &lt;&lt; 16) | ((uint64_t)Data[1] &lt;&lt; 8) | ((uint64_t)Data[2])) :
+ (*Data &lt; 0xf0) ? ((((uint64_t)Data[0] &amp; 0x0f) &lt;&lt; 24) | ((uint64_t)Data[1] &lt;&lt; 16) | ((uint64_t)Data[2] &lt;&lt; 8) | ((uint64_t)Data[3])) :
+ (*Data &lt; 0xf8) ? ((((uint64_t)Data[0] &amp; 0x07) &lt;&lt; 32) | ((uint64_t)Data[1] &lt;&lt; 24) | ((uint64_t)Data[2] &lt;&lt; 16) | ((uint64_t)Data[3] &lt;&lt; 8) | ((uint64_t)Data[4])) :
+ (*Data &lt; 0xfc) ? ((((uint64_t)Data[0] &amp; 0x03) &lt;&lt; 40) | ((uint64_t)Data[1] &lt;&lt; 32) | ((uint64_t)Data[2] &lt;&lt; 24) | ((uint64_t)Data[3] &lt;&lt; 16) | ((uint64_t)Data[4] &lt;&lt; 8) | ((uint64_t)Data[5])) :
+ (*Data &lt; 0xfe) ? ((((uint64_t)Data[0] &amp; 0x01) &lt;&lt; 48) | ((uint64_t)Data[1] &lt;&lt; 40) | ((uint64_t)Data[2] &lt;&lt; 32) | ((uint64_t)Data[3] &lt;&lt; 24) | ((uint64_t)Data[4] &lt;&lt; 16) | ((uint64_t)Data[5] &lt;&lt; 8) | ((uint64_t)Data[6])) :
+ (*Data &lt; 0xff) ? ( ((uint64_t)Data[1] &lt;&lt; 48) | ((uint64_t)Data[2] &lt;&lt; 40) | ((uint64_t)Data[3] &lt;&lt; 32) | ((uint64_t)Data[4] &lt;&lt; 24) | ((uint64_t)Data[5] &lt;&lt; 16) | ((uint64_t)Data[6] &lt;&lt; 8) | ((uint64_t)Data[7])) :
+ ( ((uint64_t)Data[1] &lt;&lt; 56) | ((uint64_t)Data[2] &lt;&lt; 48) | ((uint64_t)Data[3] &lt;&lt; 40) | ((uint64_t)Data[4] &lt;&lt; 32) | ((uint64_t)Data[5] &lt;&lt; 24) | ((uint64_t)Data[6] &lt;&lt; 16) | ((uint64_t)Data[7] &lt;&lt; 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 &gt; 0)
+ ? (((Exp &amp; 1) ? 2.0 : 1.0) *
+ ((Exp &amp; 2) ? 4.0 : 1.0) *
+ ((Exp &amp; 4) ? 16.0 : 1.0) *
+ ((Exp &amp; 8) ? 256.0 : 1.0) *
+ ((Exp &amp; 16) ? 65536.0 : 1.0) *
+ ((Exp &amp; 32) ? 4294967296.0 : 1.0) *
+ ((Exp &amp; 64) ? 18446744073709551616.0 : 1.0) *
+ ((Exp &amp; 128) ? 3.4028236692093846346337460743177e+38 : 1.0) *
+ ((Exp &amp; 256) ? 1.1579208923731619542357098500869e+77 : 1.0) *
+ ((Exp &amp; 512) ? 1.3407807929942597099574024998206e+154 : 1.0))
+ : ((((-Exp) &amp; 1) ? 0.5 : 1.0) *
+ (((-Exp) &amp; 2) ? 0.25 : 1.0) *
+ (((-Exp) &amp; 4) ? 0.0625 : 1.0) *
+ (((-Exp) &amp; 8) ? 0.00390625 : 1.0) *
+ (((-Exp) &amp; 16) ? 0.0000152587890625 : 1.0) *
+ (((-Exp) &amp; 32) ? 2.3283064365386963e-10 : 1.0) *
+ (((-Exp) &amp; 64) ? 5.421010862427522e-20 : 1.0) *
+ (((-Exp) &amp; 128) ? 2.9387358770557187699218413430556e-39 : 1.0) *
+ (((-Exp) &amp; 256) ? 8.6361685550944446253863518628004e-78 : 1.0) *
+ (((-Exp) &amp; 512) ? 7.4583407312002067432909653154629e-155 : 1.0)))">
+ <Parameter Name="Exp" Type="int32_t"/>
+ </Intrinsic>
+
+ <Intrinsic Name="ByteSwap32" Expression="(uint32_t)(((Value &amp; 0x000000ff) &lt;&lt; 24) | ((Value &amp; 0x0000ff00) &lt;&lt; 8) | ((Value &amp; 0x00ff0000) &gt;&gt; 8) | ((Value &amp; 0xff000000) &gt;&gt; 24))">
+ <Parameter Name="Value" Type="uint32_t"/>
+ </Intrinsic>
+ <Intrinsic Name="ByteSwap64" Expression="(uint64_t)(((uint64_t)ByteSwap32((uint32_t)Value) &lt;&lt; 32) | (uint64_t)ByteSwap32((uint32_t)(Value &gt;&gt; 32)))">
+ <Parameter Name="Value" Type="uint64_t"/>
+ </Intrinsic>
+
+ <Intrinsic Name="Float32ExpBits" Expression="(uint32_t)((Value &gt;&gt; 23) &amp; 0xff)">
+ <Parameter Name="Value" Type="uint32_t"/>
+ </Intrinsic>
+ <Intrinsic Name="Float32FracBits" Expression="(uint32_t)(Value &amp; 0x007fffff)">
+ <Parameter Name="Value" Type="uint32_t"/>
+ </Intrinsic>
+ <Intrinsic Name="Float32Sign" Expression="(double)((Value &amp; 0x80000000) ? -1.0 : 1.0)">
+ <Parameter Name="Value" Type="uint32_t"/>
+ </Intrinsic>
+
+ <Intrinsic Name="Float32FromBits" Expression="(float)(
+ ((Value &amp; 0x7fffffff) == 0) ? ((Value &amp; 0x80000000) ? -0.0 : 0.0) :
+ (Float32ExpBits(Value) == 0xff)
+ ? ((Float32FracBits(Value) != 0) ? (0.0 / 0.0) : ((Value &amp; 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 &gt;&gt; 52) &amp; 0x7ff)">
+ <Parameter Name="Value" Type="uint64_t"/>
+ </Intrinsic>
+ <Intrinsic Name="Float64FracBits" Expression="(uint64_t)(Value &amp; 0x000fffffffffffff)">
+ <Parameter Name="Value" Type="uint64_t"/>
+ </Intrinsic>
+ <Intrinsic Name="Float64Sign" Expression="(double)((Value &amp; 0x8000000000000000) ? -1.0 : 1.0)">
+ <Parameter Name="Value" Type="uint64_t"/>
+ </Intrinsic>
+
+ <Intrinsic Name="Float64FromBits" Expression="(double)(
+ ((Value &amp; 0x7fffffffffffffff) == 0) ? ((Value &amp; 0x8000000000000000) ? -0.0 : 0.0) :
+ (Float64ExpBits(Value) == 0x7ff)
+ ? ((Float64FracBits(Value) != 0) ? (0.0 / 0.0) : ((Value &amp; 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 &amp;&amp; Type &lt;= 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 &amp; 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 &amp; 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 &amp; 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() &amp; 0x1f)"/>
+ <Intrinsic Name="HasName" Expression="(TypeWithFlags() &amp; 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 &lt; FieldsEnd">
+ <!-- Decode -->
+ <Exec>FieldType = *Field &amp; 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()) &amp; 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 &lt; 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 &lt; FieldsEnd">
+ <!-- Decode -->
+ <Exec>FieldType = *Field &amp; 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()) &amp; 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 &lt; 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() &gt; 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() &gt; 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) &amp;&amp; (((Year() % 100) != 0) || ((Year() % 400) == 0))"/>
+
+ <Intrinsic Name="Month" Expression="
+ IsLeapYear()
+ ? ( DayOfYear() &lt; 31 ? 1
+ : DayOfYear() &lt; 60 ? 2
+ : DayOfYear() &lt; 91 ? 3
+ : DayOfYear() &lt; 121 ? 4
+ : DayOfYear() &lt; 152 ? 5
+ : DayOfYear() &lt; 182 ? 6
+ : DayOfYear() &lt; 213 ? 7
+ : DayOfYear() &lt; 244 ? 8
+ : DayOfYear() &lt; 274 ? 9
+ : DayOfYear() &lt; 305 ? 10
+ : DayOfYear() &lt; 335 ? 11 : 12)
+ : ( DayOfYear() &lt; 31 ? 1
+ : DayOfYear() &lt; 59 ? 2
+ : DayOfYear() &lt; 90 ? 3
+ : DayOfYear() &lt; 120 ? 4
+ : DayOfYear() &lt; 151 ? 5
+ : DayOfYear() &lt; 181 ? 6
+ : DayOfYear() &lt; 212 ? 7
+ : DayOfYear() &lt; 243 ? 8
+ : DayOfYear() &lt; 273 ? 9
+ : DayOfYear() &lt; 304 ? 10
+ : DayOfYear() &lt; 334 ? 11 : 12)"/>
+
+ <Intrinsic Name="Day" Expression="
+ IsLeapYear()
+ ? ( DayOfYear() &lt; 31 ? DayOfYear() + 1
+ : DayOfYear() &lt; 60 ? DayOfYear() - 31 + 1
+ : DayOfYear() &lt; 91 ? DayOfYear() - 60 + 1
+ : DayOfYear() &lt; 121 ? DayOfYear() - 91 + 1
+ : DayOfYear() &lt; 152 ? DayOfYear() - 121 + 1
+ : DayOfYear() &lt; 182 ? DayOfYear() - 152 + 1
+ : DayOfYear() &lt; 213 ? DayOfYear() - 182 + 1
+ : DayOfYear() &lt; 244 ? DayOfYear() - 213 + 1
+ : DayOfYear() &lt; 274 ? DayOfYear() - 244 + 1
+ : DayOfYear() &lt; 305 ? DayOfYear() - 274 + 1
+ : DayOfYear() &lt; 335 ? DayOfYear() - 305 + 1
+ : DayOfYear() - 335 + 1)
+ : ( DayOfYear() &lt; 31 ? DayOfYear() + 1
+ : DayOfYear() &lt; 59 ? DayOfYear() - 31 + 1
+ : DayOfYear() &lt; 90 ? DayOfYear() - 59 + 1
+ : DayOfYear() &lt; 120 ? DayOfYear() - 90 + 1
+ : DayOfYear() &lt; 151 ? DayOfYear() - 120 + 1
+ : DayOfYear() &lt; 181 ? DayOfYear() - 151 + 1
+ : DayOfYear() &lt; 212 ? DayOfYear() - 181 + 1
+ : DayOfYear() &lt; 243 ? DayOfYear() - 212 + 1
+ : DayOfYear() &lt; 273 ? DayOfYear() - 243 + 1
+ : DayOfYear() &lt; 304 ? DayOfYear() - 273 + 1
+ : DayOfYear() &lt; 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() &lt; 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() &lt; 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&lt;*&gt;">
+ <Intrinsic Name="NameFromField" Expression="Field + (((uint8_t)Type &amp; 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 &amp; 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 &amp; 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) &gt;= 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 &lt; FieldsEnd">
+ <!-- Decode -->
+ <Exec>FieldType = ((uint8_t)Type &amp; 0x40) ? (zen::CbFieldType)*Field : Type</Exec>
+ <Exec>Name = NameFromField(Field, FieldType)</Exec>
+ <Exec>NameLen = ((uint8_t)FieldType &amp; 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 &amp; 0x9f) == 0x81">nullptr</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x82">*(zen::DebugCbObject*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x83">*(zen::DebugCbUniformObject*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x84">*(zen::DebugCbArray*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x85">*(zen::DebugCbUniformArray*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x86">*(zen::DebugCbBinary*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x87">*(zen::DebugCbString*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x88">*(zen::DebugCbIntegerPositive*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x89">*(zen::DebugCbIntegerNegative*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x8a">*(zen::DebugCbFloat32*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x8b">*(zen::DebugCbFloat64*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x8c">false</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x8d">true</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x8e">*(zen::DebugCbObjectAttachment*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x8f">*(zen::DebugCbBinaryAttachment*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x90">*(zen::DebugCbHash*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x91">*(zen::DebugCbUuid*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x92">*(zen::DebugCbDateTime*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x93">*(zen::DebugCbTimeSpan*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x94">*(zen::DebugCbObjectId*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x9e">*(zen::DebugCbCustomById*)Value</Item>
+ <Item Name="[{Index}] {*(zen::DebugCbString*)Name}" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x9f">*(zen::DebugCbCustomByName*)Value</Item>
+ <!-- Display Index Only -->
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x01">nullptr</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x02">*(zen::DebugCbObject*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x03">*(zen::DebugCbUniformObject*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x04">*(zen::DebugCbArray*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x05">*(zen::DebugCbUniformArray*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x06">*(zen::DebugCbBinary*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x07">*(zen::DebugCbString*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x08">*(zen::DebugCbIntegerPositive*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x09">*(zen::DebugCbIntegerNegative*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x0a">*(zen::DebugCbFloat32*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x0b">*(zen::DebugCbFloat64*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x0c">false</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x0d">true</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x0e">*(zen::DebugCbObjectAttachment*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x0f">*(zen::DebugCbBinaryAttachment*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x10">*(zen::DebugCbHash*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x11">*(zen::DebugCbUuid*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x12">*(zen::DebugCbDateTime*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x13">*(zen::DebugCbTimeSpan*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x14">*(zen::DebugCbObjectId*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 0x9f) == 0x1e">*(zen::DebugCbCustomById*)Value</Item>
+ <Item Name="[{Index}]" Condition="((uint8_t)FieldType &amp; 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() &gt; 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() &gt; 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) &amp;&amp; (((Year() % 100) != 0) || ((Year() % 400) == 0))"/>
+
+ <Intrinsic Name="Month" Expression="
+ IsLeapYear()
+ ? ( DayOfYear() &lt; 31 ? 1
+ : DayOfYear() &lt; 60 ? 2
+ : DayOfYear() &lt; 91 ? 3
+ : DayOfYear() &lt; 121 ? 4
+ : DayOfYear() &lt; 152 ? 5
+ : DayOfYear() &lt; 182 ? 6
+ : DayOfYear() &lt; 213 ? 7
+ : DayOfYear() &lt; 244 ? 8
+ : DayOfYear() &lt; 274 ? 9
+ : DayOfYear() &lt; 305 ? 10
+ : DayOfYear() &lt; 335 ? 11 : 12)
+ : ( DayOfYear() &lt; 31 ? 1
+ : DayOfYear() &lt; 59 ? 2
+ : DayOfYear() &lt; 90 ? 3
+ : DayOfYear() &lt; 120 ? 4
+ : DayOfYear() &lt; 151 ? 5
+ : DayOfYear() &lt; 181 ? 6
+ : DayOfYear() &lt; 212 ? 7
+ : DayOfYear() &lt; 243 ? 8
+ : DayOfYear() &lt; 273 ? 9
+ : DayOfYear() &lt; 304 ? 10
+ : DayOfYear() &lt; 334 ? 11 : 12)"/>
+
+ <Intrinsic Name="Day" Expression="
+ IsLeapYear()
+ ? ( DayOfYear() &lt; 31 ? DayOfYear() + 1
+ : DayOfYear() &lt; 60 ? DayOfYear() - 31 + 1
+ : DayOfYear() &lt; 91 ? DayOfYear() - 60 + 1
+ : DayOfYear() &lt; 121 ? DayOfYear() - 91 + 1
+ : DayOfYear() &lt; 152 ? DayOfYear() - 121 + 1
+ : DayOfYear() &lt; 182 ? DayOfYear() - 152 + 1
+ : DayOfYear() &lt; 213 ? DayOfYear() - 182 + 1
+ : DayOfYear() &lt; 244 ? DayOfYear() - 213 + 1
+ : DayOfYear() &lt; 274 ? DayOfYear() - 244 + 1
+ : DayOfYear() &lt; 305 ? DayOfYear() - 274 + 1
+ : DayOfYear() &lt; 335 ? DayOfYear() - 305 + 1
+ : DayOfYear() - 335 + 1)
+ : ( DayOfYear() &lt; 31 ? DayOfYear() + 1
+ : DayOfYear() &lt; 59 ? DayOfYear() - 31 + 1
+ : DayOfYear() &lt; 90 ? DayOfYear() - 59 + 1
+ : DayOfYear() &lt; 120 ? DayOfYear() - 90 + 1
+ : DayOfYear() &lt; 151 ? DayOfYear() - 120 + 1
+ : DayOfYear() &lt; 181 ? DayOfYear() - 151 + 1
+ : DayOfYear() &lt; 212 ? DayOfYear() - 181 + 1
+ : DayOfYear() &lt; 243 ? DayOfYear() - 212 + 1
+ : DayOfYear() &lt; 273 ? DayOfYear() - 243 + 1
+ : DayOfYear() &lt; 304 ? DayOfYear() - 273 + 1
+ : DayOfYear() &lt; 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() &lt; 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() &lt; 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]&lt;&lt;24 | Hash[1]&lt;&lt;16 | Hash[2]&lt;&lt;8 | Hash[3]),xb}{uint32_t(Hash[4]&lt;&lt;24 | Hash[5]&lt;&lt;16 | Hash[6]&lt;&lt;8 | Hash[7]),xb}{uint32_t(Hash[8]&lt;&lt;24 | Hash[9]&lt;&lt;16 | Hash[10]&lt;&lt;8 | Hash[11]),xb}{uint32_t(Hash[12]&lt;&lt;24 | Hash[13]&lt;&lt;16 | Hash[14]&lt;&lt;8 | Hash[15]),xb}{uint32_t(Hash[16]&lt;&lt;24 | Hash[17]&lt;&lt;16 | Hash[18]&lt;&lt;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>