ROSE
0.11.145.147
src
util
rose_extent.h
1
#ifndef ROSE_Extent_H
2
#define ROSE_Extent_H
3
#include <featureTests.h>
4
#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5
6
#include <Rose/BinaryAnalysis/Address.h>
7
#include <Rose/BinaryAnalysis/AddressInterval.h>
8
#include <Rose/BinaryAnalysis/AddressIntervalSet.h>
9
10
#include <rangemap.h>
// rose
11
12
#include <string>
13
#include <stdio.h>
14
15
// Deprecated. Use Rose::BinaryAnalysis::AddressInterval for all new code.
16
typedef
Range<rose_addr_t>
Extent
;
17
18
// Deprecated. Use Rose::BinaryAnalysis::AddressIntervalSet instead for all new code.
19
class
ExtentMap
:
public
RangeMap
<Extent> {
20
public
:
21
ExtentMap
():
RangeMap<Extent>
() {}
22
template
<
class
Other>
ExtentMap
(
const
Other &other):
RangeMap<Extent>
(other) {}
23
static
char
category(
const
Extent
&a,
const
Extent
&b);
24
ExtentMap
subtract_from(
const
Extent
&e)
const
{
25
return
invert_within<ExtentMap>(e);
26
}
27
void
allocate_at(
const
Extent
&request);
28
Extent
allocate_best_fit(
const
rose_addr_t
size
);
29
Extent
allocate_first_fit(
const
rose_addr_t
size
);
30
void
dump_extents(std::ostream&,
const
std::string &prefix=
""
,
const
std::string &label=
""
)
const
;
31
void
dump_extents(FILE *f,
const
char
*prefix,
const
char
*label,
bool
pad=
true
)
const
;
32
};
33
34
// deprecated. Conversion functions, to be deleted when the old types are no longer needed.
35
Extent
toExtent(
const
Rose::BinaryAnalysis::AddressInterval
&);
36
Rose::BinaryAnalysis::AddressInterval
toAddressInterval(
const
Extent
&);
37
ExtentMap
toExtentMap(
const
Rose::BinaryAnalysis::AddressIntervalSet
&);
38
Rose::BinaryAnalysis::AddressIntervalSet
toAddressIntervalSet(
const
ExtentMap
&);
39
40
#endif
41
#endif
ExtentMap
Definition
rose_extent.h:19
RangeMap
A container of ranges, somewhat like a set.
Definition
rangemap.h:848
RangeMap< Extent >::size
Range::Value size() const
Returns the number of values represented by this RangeMap.
Definition
rangemap.h:1068
Range
A contiguous range of values.
Definition
rangemap.h:50
Sawyer::Container::IntervalSet< AddressInterval >
Sawyer::Container::Interval< Address >
Generated on Mon Sep 30 2024 03:25:41 for ROSE by
1.9.8