2012-12-08 06:15:38 +04:00
|
|
|
/*
|
2016-05-29 20:52:47 +03:00
|
|
|
* Copyright 2012-2016, Rene Gollent, rene@gollent.com.
|
2012-12-08 06:15:38 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef VALUE_NODE_MANAGER_H
|
|
|
|
#define VALUE_NODE_MANAGER_H
|
|
|
|
|
|
|
|
#include <Referenceable.h>
|
|
|
|
|
|
|
|
#include "ValueNodeContainer.h"
|
|
|
|
|
|
|
|
class StackFrame;
|
|
|
|
class Thread;
|
|
|
|
class Variable;
|
|
|
|
|
|
|
|
|
|
|
|
class ValueNodeManager : public BReferenceable,
|
|
|
|
private ValueNodeContainer::Listener {
|
|
|
|
public:
|
2015-11-10 17:12:55 +03:00
|
|
|
ValueNodeManager(bool addFrameNodes = true);
|
2012-12-08 06:15:38 +04:00
|
|
|
virtual ~ValueNodeManager();
|
|
|
|
|
2016-05-29 20:52:47 +03:00
|
|
|
status_t SetStackFrame(::Thread* thread,
|
2012-12-08 06:15:38 +04:00
|
|
|
StackFrame* frame);
|
|
|
|
|
|
|
|
bool AddListener(
|
|
|
|
ValueNodeContainer::Listener* listener);
|
|
|
|
void RemoveListener(
|
|
|
|
ValueNodeContainer::Listener* listener);
|
|
|
|
|
|
|
|
virtual void ValueNodeChanged(ValueNodeChild* nodeChild,
|
|
|
|
ValueNode* oldNode, ValueNode* newNode);
|
|
|
|
virtual void ValueNodeChildrenCreated(ValueNode* node);
|
|
|
|
virtual void ValueNodeChildrenDeleted(ValueNode* node);
|
|
|
|
virtual void ValueNodeValueChanged(ValueNode* node);
|
|
|
|
|
|
|
|
ValueNodeContainer* GetContainer() const { return fContainer; };
|
|
|
|
|
|
|
|
status_t AddChildNodes(ValueNodeChild* nodeChild);
|
|
|
|
|
|
|
|
private:
|
|
|
|
typedef BObjectList<ValueNodeContainer::Listener> ListenerList;
|
|
|
|
|
|
|
|
void _AddNode(Variable* variable);
|
|
|
|
status_t _CreateValueNode(ValueNodeChild* nodeChild);
|
|
|
|
|
|
|
|
private:
|
2015-11-10 17:12:55 +03:00
|
|
|
bool fAddFrameNodes;
|
2012-12-08 06:15:38 +04:00
|
|
|
ValueNodeContainer* fContainer;
|
|
|
|
StackFrame* fStackFrame;
|
2016-05-29 20:52:47 +03:00
|
|
|
::Thread* fThread;
|
2012-12-08 06:15:38 +04:00
|
|
|
ListenerList fListeners;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VALUE_NODE_MANAGER_H
|