1e8e4e613SIngo Weinhold/*
2e8e4e613SIngo Weinhold * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3e8e4e613SIngo Weinhold * Distributed under the terms of the MIT License.
4e8e4e613SIngo Weinhold */
5e8e4e613SIngo Weinhold#ifndef VARIABLES_VIEW_STATE_HISTORY_H
6e8e4e613SIngo Weinhold#define VARIABLES_VIEW_STATE_HISTORY_H
7e8e4e613SIngo Weinhold
8e8e4e613SIngo Weinhold
9e8e4e613SIngo Weinhold#include <util/OpenHashTable.h>
10e8e4e613SIngo Weinhold
11e8e4e613SIngo Weinhold
12e8e4e613SIngo Weinholdclass FunctionID;
13e8e4e613SIngo Weinholdclass VariablesViewState;
14e8e4e613SIngo Weinhold
15e8e4e613SIngo Weinhold
16e8e4e613SIngo Weinholdclass VariablesViewStateHistory {
17e8e4e613SIngo Weinholdpublic:
18e8e4e613SIngo Weinhold								VariablesViewStateHistory();
19e8e4e613SIngo Weinhold	virtual						~VariablesViewStateHistory();
20e8e4e613SIngo Weinhold
21e8e4e613SIngo Weinhold			status_t			Init();
22e8e4e613SIngo Weinhold
23e8e4e613SIngo Weinhold			VariablesViewState*	GetState(thread_id threadID,
24e8e4e613SIngo Weinhold									FunctionID* functionID) const;
25e8e4e613SIngo Weinhold			VariablesViewState*	GetState(FunctionID* functionID) const;
26e8e4e613SIngo Weinhold
27e8e4e613SIngo Weinhold			status_t			SetState(thread_id threadID,
28e8e4e613SIngo Weinhold									FunctionID* functionID,
29e8e4e613SIngo Weinhold									VariablesViewState* state);
30e8e4e613SIngo Weinhold
31e8e4e613SIngo Weinholdprivate:
32e8e4e613SIngo Weinhold			struct Key;
33e8e4e613SIngo Weinhold			struct StateEntry;
34e8e4e613SIngo Weinhold			struct StateEntryHashDefinition;
35e8e4e613SIngo Weinhold
36e8e4e613SIngo Weinhold			typedef BOpenHashTable<StateEntryHashDefinition> StateTable;
37e8e4e613SIngo Weinhold
38e8e4e613SIngo Weinholdprivate:
39e8e4e613SIngo Weinhold			StateTable*			fStates;
40e8e4e613SIngo Weinhold};
41e8e4e613SIngo Weinhold
42e8e4e613SIngo Weinhold
43e8e4e613SIngo Weinhold#endif	// VARIABLES_VIEW_STATE_HISTORY_H
44