From 570241e8b723e20083bf6c2ed64becf3f41ca115 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 20 May 2013 18:18:57 -0400 Subject: [PATCH] Extend ValueNode interface for ranged containers. Add an IsContainerRangeFixed() hook which specifies whether or not the container in question can only display elements within a fixed lower/upper bound, i.e. B{Object}List. --- src/apps/debugger/value/ValueNode.cpp | 7 +++++++ src/apps/debugger/value/ValueNode.h | 4 ++++ src/apps/debugger/value/value_nodes/BListValueNode.cpp | 7 +++++++ src/apps/debugger/value/value_nodes/BListValueNode.h | 1 + 4 files changed, 19 insertions(+) diff --git a/src/apps/debugger/value/ValueNode.cpp b/src/apps/debugger/value/ValueNode.cpp index 1166f4cabd..33bde4f59c 100644 --- a/src/apps/debugger/value/ValueNode.cpp +++ b/src/apps/debugger/value/ValueNode.cpp @@ -70,6 +70,13 @@ ValueNode::IsRangedContainer() const } +bool +ValueNode::IsContainerRangeFixed() const +{ + return false; +} + + void ValueNode::ClearChildren() { diff --git a/src/apps/debugger/value/ValueNode.h b/src/apps/debugger/value/ValueNode.h index 9b88b77ebf..c61f252159 100644 --- a/src/apps/debugger/value/ValueNode.h +++ b/src/apps/debugger/value/ValueNode.h @@ -62,6 +62,10 @@ public: // node types to allow the upper layers to be aware of this, and to be // able to request that only a subset of children be created. virtual bool IsRangedContainer() const; + virtual bool IsContainerRangeFixed() const; + // indicates that the user can't + // arbitrarily go outside of the + // specified/supported range. virtual void ClearChildren(); virtual status_t CreateChildrenInRange(int32 lowIndex, int32 highIndex); diff --git a/src/apps/debugger/value/value_nodes/BListValueNode.cpp b/src/apps/debugger/value/value_nodes/BListValueNode.cpp index 1e949b21cb..147dccde2f 100644 --- a/src/apps/debugger/value/value_nodes/BListValueNode.cpp +++ b/src/apps/debugger/value/value_nodes/BListValueNode.cpp @@ -330,6 +330,13 @@ BListValueNode::IsRangedContainer() const } +bool +BListValueNode::IsContainerRangeFixed() const +{ + return true; +} + + void BListValueNode::ClearChildren() { diff --git a/src/apps/debugger/value/value_nodes/BListValueNode.h b/src/apps/debugger/value/value_nodes/BListValueNode.h index e4347b68f3..ce34e013e0 100644 --- a/src/apps/debugger/value/value_nodes/BListValueNode.h +++ b/src/apps/debugger/value/value_nodes/BListValueNode.h @@ -37,6 +37,7 @@ public: virtual ValueNodeChild* ChildAt(int32 index) const; virtual bool IsRangedContainer() const; + virtual bool IsContainerRangeFixed() const; virtual void ClearChildren(); virtual status_t CreateChildrenInRange(int32 lowIndex, int32 highIndex);