11 typedef std::list
<Block
*> BlockList
;
12 TreeHead(uint32_t headID
);
22 BlockList m_changedList
;
23 Timestamp m_timestamp
;
25 TreeNode
*headNode() const { return m_headNode
; }
26 Timestamp
timestamp() const { return m_timestamp
; }
27 void updateTimestamp(Timestamp timestamp
) { m_timestamp
= timestamp
; }
29 void attachTo(TreeHead
*tree
);
31 const BlockList
&changedList() const { return m_changedList
; }
32 void appendChanged(Block
*block
) { m_changedList
.push_back(block
); }
34 /** Looks up a tree node.
35 @param address The address of the node to look up.
36 @return The node at @a address, or NULL if there is no block at that location.
38 TreeNode
*lookup(uint64_t address
);
40 /** Creates a tree node.
41 @param address The address of the new node.
42 @return A new node at @a address, or NULL if the node alreay exists.
44 TreeNode
*create(uint64_t address
);
46 /** Removes a tree node.
47 @param address The address of the node to remove.
48 @return True if the node was removed, false if removing the node would destroy data.
50 bool remove(uint64_t address
);
52 /** Marks an address as changed.
53 @param address The address to mark.
55 void mark(uint64_t address
);
57 TreeNode
*lookup(uint64_t address
, int lookupMode
);