2009-06-18 23:57:46 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef STACK_TRACE_H
|
|
|
|
#define STACK_TRACE_H
|
|
|
|
|
2009-06-20 21:20:49 +04:00
|
|
|
#include <ObjectList.h>
|
|
|
|
|
2009-06-18 23:57:46 +04:00
|
|
|
#include "StackFrame.h"
|
|
|
|
|
|
|
|
|
2010-12-16 16:50:30 +03:00
|
|
|
class StackTrace : public BReferenceable {
|
2009-06-18 23:57:46 +04:00
|
|
|
public:
|
|
|
|
StackTrace();
|
|
|
|
virtual ~StackTrace();
|
|
|
|
|
2009-06-20 21:20:49 +04:00
|
|
|
bool AddFrame(StackFrame* frame);
|
|
|
|
// takes over reference (also on error)
|
2009-06-18 23:57:46 +04:00
|
|
|
|
2009-06-20 21:20:49 +04:00
|
|
|
int32 CountFrames() const;
|
|
|
|
StackFrame* FrameAt(int32 index) const;
|
2009-06-18 23:57:46 +04:00
|
|
|
|
2009-06-20 21:20:49 +04:00
|
|
|
private:
|
|
|
|
typedef BObjectList<StackFrame> StackFrameList;
|
2009-06-18 23:57:46 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
StackFrameList fStackFrames;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // STACK_TRACE_H
|