A file loader. More...
#include <FileLoaderImpl.h>
Public Member Functions | |
| FileLoaderImpl (const string &filename) | |
| Constructs a file loader. More... | |
| virtual | ~FileLoaderImpl () |
| virtual string | DetectFileType (unsigned char *buf, size_t buflen, float &matchness) const =0 |
| Attempt to detect file type. More... | |
| virtual bool | LoadIntoComponent (refcount_ptr< Component > component, ostream &messages) const =0 |
| Loads the file into a Component. More... | |
Public Member Functions inherited from ReferenceCountable | |
| ReferenceCountable () | |
| Default constructor, which initializes the reference count to zero. More... | |
| ~ReferenceCountable () | |
Protected Member Functions | |
| const string & | Filename () const |
A file loader.
Definition at line 40 of file FileLoaderImpl.h.
|
inline |
Constructs a file loader.
| filename | The filename to load. |
Definition at line 49 of file FileLoaderImpl.h.
|
inlinevirtual |
Definition at line 54 of file FileLoaderImpl.h.
References DetectFileType(), and LoadIntoComponent().
|
pure virtual |
Attempt to detect file type.
| buf | A buffer containing the header of the file. |
| buflen | The length of the buffer. |
| matchness | Set to a value between 0.0 and 1.0, indicating the match certainty. |
Implemented in FileLoader_aout, FileLoader_bout, FileLoader_ELF, and FileLoader_raw.
Referenced by ~FileLoaderImpl().
|
inlineprotected |
Definition at line 81 of file FileLoaderImpl.h.
Referenced by FileLoader_raw::DetectFileType(), FileLoader_raw::LoadIntoComponent(), FileLoader_bout::LoadIntoComponent(), FileLoader_ELF::LoadIntoComponent(), and FileLoader_aout::LoadIntoComponent().
|
pure virtual |
Loads the file into a Component.
| component | The AddressDataBus component to load the file into. (This is usually a CPUComponent.) |
| messages | An output stream where debug messages can be put. |
Implemented in FileLoader_aout, FileLoader_bout, FileLoader_ELF, and FileLoader_raw.
Referenced by FileLoader::Load(), and ~FileLoaderImpl().
1.8.13