/* * 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 #include #include "ArchitectureTypes.h" class Statement; class SourceCode : public Referenceable { public: SourceCode(); ~SourceCode(); int32 CountLines() const; const char* LineAt(int32 index) const; int32 CountStatements() const; Statement* StatementAt(int32 index) const; Statement* StatementAtAddress(target_addr_t address) const; bool AddLine(const char* line); // clones bool AddStatement(Statement* statement); // takes over reference private: typedef BObjectList LineList; typedef BObjectList StatementList; private: LineList fLines; StatementList fStatements; }; #endif // SOURCE_CODE_H