vfs: check userland buffers before reading them.
[haiku.git] / src / apps / debugger / user_interface / gui / model / VariablesViewStateHistory.h
blob4e09c2496f0aee34eac4351ee26d5b86fda724c3
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef VARIABLES_VIEW_STATE_HISTORY_H
6 #define VARIABLES_VIEW_STATE_HISTORY_H
9 #include <util/OpenHashTable.h>
12 class FunctionID;
13 class VariablesViewState;
16 class VariablesViewStateHistory {
17 public:
18 VariablesViewStateHistory();
19 virtual ~VariablesViewStateHistory();
21 status_t Init();
23 VariablesViewState* GetState(thread_id threadID,
24 FunctionID* functionID) const;
25 VariablesViewState* GetState(FunctionID* functionID) const;
27 status_t SetState(thread_id threadID,
28 FunctionID* functionID,
29 VariablesViewState* state);
31 private:
32 struct Key;
33 struct StateEntry;
34 struct StateEntryHashDefinition;
36 typedef BOpenHashTable<StateEntryHashDefinition> StateTable;
38 private:
39 StateTable* fStates;
43 #endif // VARIABLES_VIEW_STATE_HISTORY_H