btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / debugger / model / Statement.h
blobe07a100be4818651d01a6daa16afe4c5e90720b8
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef STATEMENT_H
6 #define STATEMENT_H
8 #include <Referenceable.h>
10 #include "SourceLocation.h"
11 #include "TargetAddressRange.h"
12 #include "Types.h"
15 class Statement : public BReferenceable {
16 public:
17 virtual ~Statement();
19 virtual SourceLocation StartSourceLocation() const = 0;
21 virtual TargetAddressRange CoveringAddressRange() const = 0;
23 virtual int32 CountAddressRanges() const = 0;
24 virtual TargetAddressRange AddressRangeAt(int32 index) const = 0;
26 virtual bool ContainsAddress(target_addr_t address)
27 const = 0;
31 class AbstractStatement : public Statement {
32 public:
33 AbstractStatement(const SourceLocation& start);
35 virtual SourceLocation StartSourceLocation() const;
37 protected:
38 SourceLocation fStart;
42 class ContiguousStatement : public AbstractStatement {
43 public:
44 ContiguousStatement(const SourceLocation& start,
45 const TargetAddressRange& range);
47 const TargetAddressRange& AddressRange() const
48 { return fRange; }
50 virtual TargetAddressRange CoveringAddressRange() const;
52 virtual int32 CountAddressRanges() const;
53 virtual TargetAddressRange AddressRangeAt(int32 index) const;
55 virtual bool ContainsAddress(target_addr_t address) const;
57 protected:
58 TargetAddressRange fRange;
62 #endif // STATEMENT_H