25 #ifndef COMMON_PE_EXE_H 26 #define COMMON_PE_EXE_H 31 #include <boost/noncopyable.hpp> 39 class SeekableReadStream;
108 const std::vector<PEResourceID>
getTypeList()
const;
135 typedef std::map<PEResourceID, Resource>
LangMap;
136 typedef std::map<PEResourceID, LangMap>
NameMap;
137 typedef std::map<PEResourceID, NameMap>
TypeMap;
158 #endif // COMMON_PE_EXE_H const std::vector< PEResourceID > getTypeList() const
Return a list of resource types.
A class holding an UTF-8 string.
const std::vector< PEResourceID > getNameList(const PEResourceID &type) const
Return a list of names for a given type.
PEResourceID & operator=(UString string)
ScopedPtr< SeekableReadStream > _exe
SeekableReadStream * getResource(const PEResourceID &type, const PEResourceID &name)
Return a stream to the specified resource, taking the first language found (or 0 if non-existent)...
bool operator==(const UString &x) const
bool operator<(const PEResourceID &x) const
UString getString() const
A simple scoped smart pointer template.
std::map< UString, Section > _sections
std::map< PEResourceID, NameMap > TypeMap
PEResources(SeekableReadStream *exe)
UString _name
The resource's string ID.
bool loadFromEXE(SeekableReadStream &exe)
Low-level type definitions to handle fixed width types portably.
const std::vector< PEResourceID > getLangList(const PEResourceID &type, const PEResourceID &name) const
Return a list of languages for a given type and name.
A scoped plain pointer, allowing pointer-y access and normal deletion.
A class able to load resources from a Windows Portable Executable, such as cursors, bitmaps, and sounds.
std::map< PEResourceID, Resource > LangMap
PEResourceType
The default Windows PE resources.
enum Common::PEResourceID::IDType _idType
void parseResourceLevel(SeekableReadStream &exe, Section §ion, uint32 offset, int level)
std::map< PEResourceID, LangMap > NameMap
Interface for a seekable & readable data stream.
uint32 _id
The resource's numerical ID.