BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
parser
pe
rsrc
ResourceContentFactory.cpp
Go to the documentation of this file.
1
#include "
pe/rsrc/ResourceContentFactory.h
"
2
#include "
pe/rsrc/ResourceStringsWrapper.h
"
3
#include "
pe/rsrc/ResourceVersionWrapper.h
"
4
5
ResourceContentWrapper
*
ResourceContentFactory::makeResContentWrapper
(pe::resource_type typeId,
ResourceLeafWrapper
* leaf)
6
{
7
if
(leaf == NULL)
return
NULL;
8
9
Executable
*pe = leaf->
getExe
();
10
if
(pe == NULL)
return
NULL;
11
12
ResourceContentWrapper
* cw = NULL;
13
14
switch
(typeId) {
15
case
pe::RESTYPE_STRING:
16
return
new
ResourceStringsWrapper
(pe, leaf);
17
18
case
pe::RESTYPE_VERSION:
19
return
new
ResourceVersionWrapper
(pe, leaf);
20
21
case
pe::RESTYPE_MANIFEST:
22
return
new
ReourceManifestWrapper
(pe, leaf);
23
24
case
pe::RESTYPE_HTML:
25
return
new
ReourceHTMLWrapper
(pe, leaf);
26
27
default
:
28
cw =
new
ResourceContentWrapper
(pe, leaf, typeId);
29
}
30
//printf("Making ResourceContentWrapper of type: %d\n", typeId);
31
//if (!isSupportedType(typeId))
32
return
cw;
33
}
ResourceContentFactory.h
ResourceStringsWrapper.h
ResourceVersionWrapper.h
Executable
Definition
Executable.h:26
ReourceHTMLWrapper
Definition
ResourceContentWrapper.h:60
ReourceManifestWrapper
Definition
ResourceContentWrapper.h:48
ResourceContentFactory::makeResContentWrapper
static ResourceContentWrapper * makeResContentWrapper(pe::resource_type typeId, ResourceLeafWrapper *leaf)
Definition
ResourceContentFactory.cpp:5
ResourceContentWrapper
Definition
ResourceContentWrapper.h:10
ResourceLeafWrapper
Definition
ResourceLeafWrapper.h:10
ResourceLeafWrapper::getExe
Executable * getExe()
Definition
ResourceLeafWrapper.h:42
ResourceStringsWrapper
Definition
ResourceStringsWrapper.h:56
ResourceVersionWrapper
Definition
ResourceVersionWrapper.h:8
Generated by
1.12.0