#include <Resource.h>
Public Member Functions | |
| Resource (void) | |
| ~Resource (void) | |
| HMODULE | GetModuleHandle () const |
| unsigned | GetNameID () const |
| const cl7::string_type & | GetType () const |
| const cl7::string_type & | GetName () const |
| bool | IsOpen () const |
| unsigned | GetSize () const |
| unsigned | GetPointer () const |
| unsigned | SetPointer (unsigned pointer) |
| bool | Open (HMODULE module_handle, unsigned name_id, const cl7::string_type &type) |
| bool | Open () |
| bool | Close () |
| unsigned | Read (void *buffer, unsigned bytes) |
| unsigned | Seek (signed bytes, const SeekFlags from=current) |
The class to read data from a resource.
| xl7::io::Resource::Resource | ( | void | ) |
Default constructor.
| xl7::io::Resource::~Resource | ( | void | ) |
Destructor.
| bool xl7::io::Resource::Close | ( | ) | [virtual] |
Closes the resource.
Implements xl7::io::IRom.
| HMODULE xl7::io::Resource::GetModuleHandle | ( | ) | const [inline] |
Returns the handle to the module whose binary file contains the resource.
| const cl7::string_type& xl7::io::Resource::GetName | ( | ) | const [inline] |
Returns the name of the (open) resource.
| unsigned xl7::io::Resource::GetNameID | ( | ) | const [inline] |
Returns the integer identifier of the name of the resource.
| unsigned xl7::io::Resource::GetPointer | ( | ) | const [inline, virtual] |
Returns the current byte position to read data.
Implements xl7::io::IRom.
| unsigned xl7::io::Resource::GetSize | ( | ) | const [virtual] |
Returns the size of the resource, in bytes.
Implements xl7::io::IRom.
| const cl7::string_type& xl7::io::Resource::GetType | ( | ) | const [inline] |
Returns the type of the resource.
| bool xl7::io::Resource::IsOpen | ( | ) | const [inline, virtual] |
Checks whether the resource is open.
Implements xl7::io::IRom.
| bool xl7::io::Resource::Open | ( | HMODULE | module_handle, | |
| unsigned | name_id, | |||
| const cl7::string_type & | type | |||
| ) |
Opens the resource for reading.
| bool xl7::io::Resource::Open | ( | ) | [virtual] |
Re-opens the resource for reading. Ensure that you have already opened the resource earlier (see Open).
Implements xl7::io::IRom.
| unsigned xl7::io::Resource::Read | ( | void * | buffer, | |
| unsigned | bytes | |||
| ) | [virtual] |
Reads data from the resource and returns the number of bytes read.
Implements xl7::io::IRom.
| unsigned xl7::io::Resource::Seek | ( | signed | bytes, | |
| const SeekFlags | from = current | |||
| ) | [virtual] |
Resets the current byte position to read data by moving the pointer by the specified bytes. The function returns the new position.
Implements xl7::io::IRom.
| unsigned xl7::io::Resource::SetPointer | ( | unsigned | pointer | ) | [virtual] |
Resets the current byte position to read data. The function returns the new position.
Implements xl7::io::IRom.
1.7.1