BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
ResourceContentFactory.cpp
Go to the documentation of this file.
4
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}
static ResourceContentWrapper * makeResContentWrapper(pe::resource_type typeId, ResourceLeafWrapper *leaf)