ROSE
0.9.6a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PeRvaSizePair.C
Go to the documentation of this file.
1
#include "
sage3basic.h
"
2
3
void
4
SgAsmPERVASizePair::ctor
(
SgAsmPERVASizePairList
*parent,
const
RVASizePair_disk
*disk) {
5
p_e_rva
=
ByteOrder::le_to_host
(disk->
e_rva
);
6
p_e_size
=
ByteOrder::le_to_host
(disk->
e_size
);
7
set_parent
(parent);
8
}
9
10
void
11
SgAsmPERVASizePair::ctor
(
SgAsmPERVASizePairList
*parent,
rose_addr_t
rva
,
rose_addr_t
size)
12
{
13
p_e_rva
=
rva
;
14
p_e_size
= size;
15
set_parent
(parent);
16
}
17
18
void
*
19
SgAsmPERVASizePair::encode
(
RVASizePair_disk
*disk)
const
{
20
ByteOrder::host_to_le
(
p_e_rva
, &(disk->
e_rva
));
21
ByteOrder::host_to_le
(
p_e_size
, &(disk->
e_size
));
22
return
disk;
23
}
24
27
void
28
SgAsmPERVASizePair::set_section
(
SgAsmGenericSection
*section)
29
{
30
if
(section!=
p_section
)
31
set_isModified
(
true
);
32
p_section
= section;
33
if
(section) {
34
set_e_rva
(
rose_rva_t
(section->
get_mapped_preferred_rva
(), section));
35
set_e_size
(section->
get_mapped_size
());
36
}
else
{
37
set_e_rva
(0);
38
set_e_size
(0);
39
}
40
}
41
44
SgAsmGenericSection
*
45
SgAsmPERVASizePair::get_section
()
const
46
{
47
return
p_section
;
48
}
49
rose-edg4x
src
frontend
BinaryFormats
PeRvaSizePair.C
Generated on Mon May 5 2014 17:29:25 for ROSE by
1.8.4