2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
8 #include <Referenceable.h>
10 #include "SourceLocation.h"
11 #include "TargetAddressRange.h"
15 class Statement
: public BReferenceable
{
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
)
31 class AbstractStatement
: public Statement
{
33 AbstractStatement(const SourceLocation
& start
);
35 virtual SourceLocation
StartSourceLocation() const;
38 SourceLocation fStart
;
42 class ContiguousStatement
: public AbstractStatement
{
44 ContiguousStatement(const SourceLocation
& start
,
45 const TargetAddressRange
& range
);
47 const TargetAddressRange
& AddressRange() const
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;
58 TargetAddressRange fRange
;