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 7 8 9 #include <util/OpenHashTable.h> 10 11 12 class FunctionID; 13 class VariablesViewState; 14 15 16 class VariablesViewStateHistory { 17 public: 18 VariablesViewStateHistory(); 19 virtual ~VariablesViewStateHistory(); 20 21 status_t Init(); 22 23 VariablesViewState* GetState(thread_id threadID, 24 FunctionID* functionID) const; 25 VariablesViewState* GetState(FunctionID* functionID) const; 26 27 status_t SetState(thread_id threadID, 28 FunctionID* functionID, 29 VariablesViewState* state); 30 31 private: 32 struct Key; 33 struct StateEntry; 34 struct StateEntryHashDefinition; 35 36 typedef BOpenHashTable<StateEntryHashDefinition> StateTable; 37 38 private: 39 StateTable* fStates; 40 }; 41 42 43 #endif // VARIABLES_VIEW_STATE_HISTORY_H 44