haiku/src/apps/debugger/model/StackFrameValueInfos.h
Ingo Weinhold c3e066cf6d Replaced uses of obsolescent BReference[able] API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 13:50:30 +00:00

79 lines
1.8 KiB
C++

/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef STACK_FRAME_VALUE_INFOS_H
#define STACK_FRAME_VALUE_INFOS_H
#include <Referenceable.h>
#include <util/OpenHashTable.h>
#include <Variant.h>
class ObjectID;
class Type;
class TypeComponentPath;
class ValueLocation;
class StackFrameValueInfos : public BReferenceable {
public:
StackFrameValueInfos();
virtual ~StackFrameValueInfos();
status_t Init();
bool GetInfo(ObjectID* variable,
const TypeComponentPath* path,
Type** _type, ValueLocation** _location)
const;
// returns references
inline bool GetInfo(ObjectID* variable,
const TypeComponentPath& path,
Type** _type, ValueLocation** _location)
const;
// returns references
bool HasInfo(ObjectID* variable,
const TypeComponentPath* path) const;
inline bool HasInfo(ObjectID* variable,
const TypeComponentPath& path) const;
status_t SetInfo(ObjectID* variable,
TypeComponentPath* path, Type* type,
ValueLocation* location);
private:
struct Key;
struct InfoEntry;
struct InfoEntryHashDefinition;
typedef BOpenHashTable<InfoEntryHashDefinition> ValueTable;
private:
StackFrameValueInfos& operator=(const StackFrameValueInfos& other);
void _Cleanup();
private:
ValueTable* fValues;
};
bool
StackFrameValueInfos::GetInfo(ObjectID* variable, const TypeComponentPath& path,
Type** _type, ValueLocation** _location) const
{
return GetInfo(variable, &path, _type, _location);
}
bool
StackFrameValueInfos::HasInfo(ObjectID* variable, const TypeComponentPath& path)
const
{
return HasInfo(variable, &path);
}
#endif // STACK_FRAME_VALUE_INFOS_H