ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A class able to load resources from a Windows Portable Executable, such as cursors, bitmaps, and sounds. More...

#include <winexe_pe.h>

Collaboration diagram for Common::PEResources:

List of all members.

Classes

struct  Resource
struct  Section

Public Member Functions

 PEResources ()
 ~PEResources ()
void clear ()
 Clear all information.
bool loadFromEXE (const String &fileName)
 Load from an EXE file.
bool loadFromEXE (SeekableReadStream *stream)
 Load from a stream.
const Array< WinResourceIDgetTypeList () const
 Return a list of resource types.
const Array< WinResourceIDgetNameList (const WinResourceID &type) const
 Return a list of names for a given type.
const Array< WinResourceIDgetLangList (const WinResourceID &type, const WinResourceID &name) const
 Return a list of languages for a given type and name.
SeekableReadStreamgetResource (const WinResourceID &type, const WinResourceID &name)
 Return a stream to the specified resource, taking the first language found (or 0 if non-existent).
SeekableReadStreamgetResource (const WinResourceID &type, const WinResourceID &name, const WinResourceID &lang)
 Return a stream to the specified resource (or 0 if non-existent).

Private Types

typedef HashMap< WinResourceID,
Resource, WinResourceID_Hash,
WinResourceID_EqualTo
LangMap
typedef HashMap< WinResourceID,
LangMap, WinResourceID_Hash,
WinResourceID_EqualTo
NameMap
typedef HashMap< WinResourceID,
NameMap, WinResourceID_Hash,
WinResourceID_EqualTo
TypeMap

Private Member Functions

void parseResourceLevel (Section &section, uint32 offset, int level)

Private Attributes

HashMap< String, Section,
IgnoreCase_Hash,
IgnoreCase_EqualTo
_sections
SeekableReadStream_exe
WinResourceID _curType
WinResourceID _curName
WinResourceID _curLang
TypeMap _resources

Detailed Description

A class able to load resources from a Windows Portable Executable, such as cursors, bitmaps, and sounds.

Definition at line 63 of file winexe_pe.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Common::PEResources::PEResources (  ) 

Definition at line 33 of file winexe_pe.cpp.

Common::PEResources::~PEResources (  ) 

Definition at line 37 of file winexe_pe.cpp.


Member Function Documentation

void Common::PEResources::clear (  ) 

Clear all information.

Definition at line 41 of file winexe_pe.cpp.

const Array< WinResourceID > Common::PEResources::getLangList ( const WinResourceID type,
const WinResourceID name 
) const

Return a list of languages for a given type and name.

Definition at line 204 of file winexe_pe.cpp.

const Array< WinResourceID > Common::PEResources::getNameList ( const WinResourceID type  )  const

Return a list of names for a given type.

Definition at line 190 of file winexe_pe.cpp.

SeekableReadStream * Common::PEResources::getResource ( const WinResourceID type,
const WinResourceID name,
const WinResourceID lang 
)

Return a stream to the specified resource (or 0 if non-existent).

Definition at line 234 of file winexe_pe.cpp.

SeekableReadStream * Common::PEResources::getResource ( const WinResourceID type,
const WinResourceID name 
)

Return a stream to the specified resource, taking the first language found (or 0 if non-existent).

Definition at line 223 of file winexe_pe.cpp.

const Array< WinResourceID > Common::PEResources::getTypeList (  )  const

Return a list of resource types.

Definition at line 178 of file winexe_pe.cpp.

bool Common::PEResources::loadFromEXE ( const String fileName  ) 

Load from an EXE file.

Definition at line 47 of file winexe_pe.cpp.

bool Common::PEResources::loadFromEXE ( SeekableReadStream stream  ) 

Load from a stream.

Definition at line 61 of file winexe_pe.cpp.

void Common::PEResources::parseResourceLevel ( Section section,
uint32  offset,
int  level 
) [private]

Definition at line 118 of file winexe_pe.cpp.


Member Data Documentation

Definition at line 104 of file winexe_pe.h.

Definition at line 104 of file winexe_pe.h.

Definition at line 104 of file winexe_pe.h.

Definition at line 101 of file winexe_pe.h.

Definition at line 115 of file winexe_pe.h.


The documentation for this class was generated from the following files:


Generated on Sat May 18 2019 05:06:09 for ResidualVM by doxygen 1.7.1
curved edge   curved edge