btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / debugger / value / value_nodes / BListValueNode.h
blob6a2e2b3c6c09e30890db56710e16eea474b6825f
1 /*
2 * Copyright 2012-2015, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef BLIST_VALUE_NODE_H
6 #define BLIST_VALUE_NODE_H
9 #include <List.h>
10 #include <Variant.h>
12 #include <ObjectList.h>
14 #include "ValueLocation.h"
15 #include "ValueNode.h"
18 class CompoundType;
21 class BListValueNode : public ValueNode {
22 public:
23 BListValueNode(ValueNodeChild* nodeChild,
24 Type* type);
25 virtual ~BListValueNode();
27 virtual Type* GetType() const;
28 virtual status_t ResolvedLocationAndValue(
29 ValueLoader* valueLoader,
30 ValueLocation*& _location,
31 Value*& _value);
33 virtual bool ChildCreationNeedsValue() const
34 { return true; }
35 virtual status_t CreateChildren(TeamTypeInformation* info);
36 virtual int32 CountChildren() const;
37 virtual ValueNodeChild* ChildAt(int32 index) const;
39 virtual bool IsRangedContainer() const;
40 virtual bool IsContainerRangeFixed() const;
41 virtual void ClearChildren();
42 virtual status_t CreateChildrenInRange(
43 TeamTypeInformation* info,
44 int32 lowIndex, int32 highIndex);
45 virtual status_t SupportedChildRange(int32& lowIndex,
46 int32& highIndex) const;
47 private:
48 class BListElementNodeChild;
49 class BListItemCountNodeChild;
51 // for GCC2
52 friend class BListElementNodeChild;
53 friend class BListItemCountNodeChild;
55 typedef BObjectList<ValueNodeChild> ChildNodeList;
57 private:
59 Type* fType;
60 ChildNodeList fChildren;
61 BVariant fDataLocation;
62 BVariant fItemCountLocation;
63 Type* fItemCountType;
64 int32 fItemCount;
65 bool fCountChildCreated;
69 #endif // BLIST_VALUE_NODE_H