2009-06-21 17:17:21 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef SOURCE_CODE_H
|
|
|
|
#define SOURCE_CODE_H
|
|
|
|
|
|
|
|
#include <Referenceable.h>
|
|
|
|
|
|
|
|
#include "ArchitectureTypes.h"
|
|
|
|
|
|
|
|
|
|
|
|
class Statement;
|
|
|
|
|
|
|
|
|
|
|
|
class SourceCode : public Referenceable {
|
|
|
|
public:
|
2009-06-22 05:13:57 +04:00
|
|
|
virtual ~SourceCode();
|
2009-06-21 17:17:21 +04:00
|
|
|
|
2009-06-22 05:13:57 +04:00
|
|
|
virtual int32 CountLines() const = 0;
|
|
|
|
virtual const char* LineAt(int32 index) const = 0;
|
2009-06-21 17:17:21 +04:00
|
|
|
|
2009-06-22 05:13:57 +04:00
|
|
|
virtual int32 CountStatements() const = 0;
|
|
|
|
virtual Statement* StatementAt(int32 index) const = 0;
|
|
|
|
virtual Statement* StatementAtLine(int32 index) const = 0;
|
|
|
|
virtual Statement* StatementAtAddress(target_addr_t address)
|
|
|
|
const = 0;
|
2009-06-21 17:17:21 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SOURCE_CODE_H
|