2009-09-21 08:39:40 +04:00
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
|
|
|
|
|
2010-12-16 16:50:30 +03:00
|
|
|
class StackFrameValueInfos : public BReferenceable {
|
2009-09-21 08:39:40 +04:00
|
|
|
public:
|
|
|
|
StackFrameValueInfos();
|
|
|
|
virtual ~StackFrameValueInfos();
|
|
|
|
|
|
|
|
status_t Init();
|
|
|
|
|
|
|
|
bool GetInfo(ObjectID* variable,
|
|
|
|
const TypeComponentPath* path,
|
|
|
|
Type** _type, ValueLocation** _location)
|
|
|
|
const;
|
2009-10-11 09:40:51 +04:00
|
|
|
// returns references
|
2009-09-21 08:39:40 +04:00
|
|
|
inline bool GetInfo(ObjectID* variable,
|
|
|
|
const TypeComponentPath& path,
|
|
|
|
Type** _type, ValueLocation** _location)
|
|
|
|
const;
|
2009-10-11 09:40:51 +04:00
|
|
|
// returns references
|
2009-09-21 08:39:40 +04:00
|
|
|
bool HasInfo(ObjectID* variable,
|
|
|
|
const TypeComponentPath* path) const;
|
|
|
|
inline bool HasInfo(ObjectID* variable,
|
|
|
|
const TypeComponentPath& path) const;
|
|
|
|
status_t SetInfo(ObjectID* variable,
|
2009-10-11 09:40:51 +04:00
|
|
|
TypeComponentPath* path, Type* type,
|
|
|
|
ValueLocation* location);
|
2009-09-21 08:39:40 +04:00
|
|
|
|
|
|
|
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
|