| xoreos
    0.0.5
    | 
A class able to load resources from a Windows Portable Executable, such as cursors, bitmaps, and sounds. More...
#include <pe_exe.h>


| Classes | |
| struct | Resource | 
| struct | Section | 
| Public Member Functions | |
| PEResources (SeekableReadStream *exe) | |
| ~PEResources () | |
| const std::vector< PEResourceID > | getTypeList () const | 
| Return a list of resource types.  More... | |
| const std::vector< PEResourceID > | getNameList (const PEResourceID &type) const | 
| Return a list of names for a given type.  More... | |
| const std::vector< PEResourceID > | getLangList (const PEResourceID &type, const PEResourceID &name) const | 
| Return a list of languages for a given type and name.  More... | |
| 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).  More... | |
| SeekableReadStream * | getResource (const PEResourceID &type, const PEResourceID &name, const PEResourceID &lang) | 
| Return a stream to the specified resource (or 0 if non-existent).  More... | |
| Private Types | |
| typedef std::map< PEResourceID, Resource > | LangMap | 
| typedef std::map< PEResourceID, LangMap > | NameMap | 
| typedef std::map< PEResourceID, NameMap > | TypeMap | 
| Private Member Functions | |
| bool | loadFromEXE (SeekableReadStream &exe) | 
| void | parseResourceLevel (SeekableReadStream &exe, Section §ion, uint32 offset, int level) | 
| Private Attributes | |
| std::map< UString, Section > | _sections | 
| ScopedPtr< SeekableReadStream > | _exe | 
| PEResourceID | _curType | 
| PEResourceID | _curName | 
| PEResourceID | _curLang | 
| TypeMap | _resources | 
A class able to load resources from a Windows Portable Executable, such as cursors, bitmaps, and sounds.
| 
 | private | 
| 
 | private | 
| 
 | private | 
| Common::PEResources::PEResources | ( | SeekableReadStream * | exe | ) | 
Definition at line 104 of file pe_exe.cpp.
References _exe, and loadFromEXE().

| Common::PEResources::~PEResources | ( | ) | 
Definition at line 111 of file pe_exe.cpp.
| const std::vector< PEResourceID > Common::PEResources::getLangList | ( | const PEResourceID & | type, | 
| const PEResourceID & | name | ||
| ) | const | 
Return a list of languages for a given type and name.
Definition at line 244 of file pe_exe.cpp.
References _resources.
Referenced by getResource().

| const std::vector< PEResourceID > Common::PEResources::getNameList | ( | const PEResourceID & | type | ) | const | 
Return a list of names for a given type.
Definition at line 230 of file pe_exe.cpp.
References _resources.
| SeekableReadStream * Common::PEResources::getResource | ( | const PEResourceID & | type, | 
| const PEResourceID & | name | ||
| ) | 
Return a stream to the specified resource, taking the first language found (or 0 if non-existent).
Definition at line 263 of file pe_exe.cpp.
References _exe, _resources, getLangList(), Common::PEResources::Resource::offset, and Common::PEResources::Resource::size.

| SeekableReadStream * Common::PEResources::getResource | ( | const PEResourceID & | type, | 
| const PEResourceID & | name, | ||
| const PEResourceID & | lang | ||
| ) | 
Return a stream to the specified resource (or 0 if non-existent).
Definition at line 274 of file pe_exe.cpp.
References _exe, _resources, Common::PEResources::Resource::offset, and Common::PEResources::Resource::size.
| const std::vector< PEResourceID > Common::PEResources::getTypeList | ( | ) | const | 
| 
 | private | 
Definition at line 114 of file pe_exe.cpp.
References _sections, MKTAG, MKTAG_16, Common::PEResources::Section::offset, parseResourceLevel(), Common::ReadStream::read(), Common::ReadStream::readUint16BE(), Common::ReadStream::readUint16LE(), Common::ReadStream::readUint32BE(), Common::ReadStream::readUint32LE(), Common::SeekableReadStream::seek(), Common::PEResources::Section::size, Common::SeekableReadStream::size(), Common::SeekableReadStream::skip(), and Common::PEResources::Section::virtualAddress.
Referenced by PEResources().


| 
 | private | 
Definition at line 162 of file pe_exe.cpp.
References _curLang, _curName, _curType, _resources, Common::kEncodingUTF16LE, Common::PEResources::Section::offset, Common::PEResources::Resource::offset, Common::SeekableReadStream::pos(), Common::readStringFixed(), Common::ReadStream::readUint16LE(), Common::ReadStream::readUint32LE(), Common::SeekableReadStream::seek(), Common::PEResources::Resource::size, and Common::PEResources::Section::virtualAddress.
Referenced by loadFromEXE().


| 
 | private | 
Definition at line 146 of file pe_exe.h.
Referenced by parseResourceLevel().
| 
 | private | 
Definition at line 145 of file pe_exe.h.
Referenced by parseResourceLevel().
| 
 | private | 
Definition at line 144 of file pe_exe.h.
Referenced by parseResourceLevel().
| 
 | private | 
Definition at line 142 of file pe_exe.h.
Referenced by getResource(), and PEResources().
| 
 | private | 
Definition at line 148 of file pe_exe.h.
Referenced by getLangList(), getNameList(), getResource(), getTypeList(), and parseResourceLevel().
Definition at line 139 of file pe_exe.h.
Referenced by loadFromEXE().
 1.8.14
 1.8.14