xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aurora::PEFile Class Reference

A class encapsulating PE exe's for resource archive access. More...

#include <pefile.h>

Inheritance diagram for Aurora::PEFile:
Inheritance graph
[legend]
Collaboration diagram for Aurora::PEFile:
Collaboration graph
[legend]

Public Member Functions

 PEFile (Common::SeekableReadStream *exe, const std::vector< Common::UString > &remap)
 Take over this stream and read a PE file out of it. More...
 
 ~PEFile ()
 
const ResourceListgetResources () const
 Return the list of resources. More...
 
Common::SeekableReadStreamgetResource (uint32 index, bool tryNoCopy=false) const
 Return a stream of the resource's contents. More...
 
- Public Member Functions inherited from Aurora::Archive
 Archive ()
 
virtual ~Archive ()
 
virtual uint32 getResourceSize (uint32 index) const
 Return the size of a resource. More...
 
virtual Common::HashAlgo getNameHashAlgo () const
 Return with which algorithm the name is hashed. More...
 
uint32 findResource (uint64 hash) const
 Return the index of the resource matching the hash, or 0xFFFFFFFF if not found. More...
 
uint32 findResource (const Common::UString &name, FileType type) const
 Return the index of the resource matching the name and type, or 0xFFFFFFFF if not found. More...
 

Private Member Functions

void load (const std::vector< Common::UString > &remap)
 

Private Attributes

Common::ScopedPtr< Common::PEResources_peFile
 The actual exe. More...
 
ResourceList _resources
 External list of resource names and types. More...
 

Additional Inherited Members

- Public Types inherited from Aurora::Archive
typedef std::list< ResourceResourceList
 

Detailed Description

A class encapsulating PE exe's for resource archive access.

Definition at line 45 of file pefile.h.

Constructor & Destructor Documentation

◆ PEFile()

Aurora::PEFile::PEFile ( Common::SeekableReadStream exe,
const std::vector< Common::UString > &  remap 
)

Take over this stream and read a PE file out of it.

Definition at line 35 of file pefile.cpp.

References _peFile, load(), and Common::ScopedPtrBase< T, Deallocator >::reset().

Here is the call graph for this function:

◆ ~PEFile()

Aurora::PEFile::~PEFile ( )

Definition at line 43 of file pefile.cpp.

Member Function Documentation

◆ getResource()

Common::SeekableReadStream * Aurora::PEFile::getResource ( uint32  index,
bool  tryNoCopy = false 
) const
virtual

◆ getResources()

const Archive::ResourceList & Aurora::PEFile::getResources ( ) const
virtual

Return the list of resources.

Implements Aurora::Archive.

Definition at line 46 of file pefile.cpp.

References _resources.

◆ load()

void Aurora::PEFile::load ( const std::vector< Common::UString > &  remap)
private

Definition at line 104 of file pefile.cpp.

References _peFile, _resources, Common::UString::format(), Aurora::Archive::Resource::index, Aurora::kFileTypeCUR, Common::kPEGroupCursor, Aurora::Archive::Resource::name, and Aurora::Archive::Resource::type.

Referenced by PEFile().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _peFile

Common::ScopedPtr<Common::PEResources> Aurora::PEFile::_peFile
private

The actual exe.

Definition at line 59 of file pefile.h.

Referenced by getResource(), load(), and PEFile().

◆ _resources

ResourceList Aurora::PEFile::_resources
private

External list of resource names and types.

Definition at line 62 of file pefile.h.

Referenced by getResources(), and load().


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