Main Page Class Hierarchy Compound List Compound Members Related Pages
ObjectFileImportTable Class ReferenceThe class ObjectFileImportTable contains the information needed to allow libraries and scenes to import global variables, functions and class declarations from other libraries.
More...
#include <ObjectFileImp.h>
Inheritance diagram for ObjectFileImportTable
[legend]Collaboration diagram for ObjectFileImportTable:
[legend]List of all members.
Public Types |
|
typedef DataChunk | inherited |
Public Methods |
|
| ObjectFileImportTable () |
|
unsigned long | getVersion ()const throw () |
|
void | setVersion (unsigned long version) throw () |
|
const string& | getName ()const throw () |
|
void | setName (const string &sName) |
|
virtual unsigned long | getStreamSize () |
|
virtual unsigned long | getStreamChunk () |
|
virtual void | write (OutputStreamWriterNDR &os) |
|
virtual void | read (InputStreamWriterNDR &is) |
Protected Methods |
|
void | readImportEntry (InputStreamWriterNDR &is) |
Protected Attributes |
|
string | m_sLibrary |
|
unsigned long | m_nVersion |
|
std::vector<ImportEntry*> | table |
Detailed Description
The class ObjectFileImportTable contains the information needed to allow libraries and scenes to import global variables, functions and class declarations from other libraries.
The last one isn't yet supported but will be in the future. This information is optinal for both scenes and for libraries.
ObjectFile -- IMPORTTABLE (many per file, optional) \begin{verbatim} Offset Size Type Comment --------------------------------------------------------- 0 4 Byte fourcc 'IMPT' (IMPort Table) 4 4 Byte int32 size of the chunk 8 x Byte string library name
- 4 Byte int32 number of symbols imported
- y Byte chunks subchunks containing the imported symbols --------------------------------------------------------- (string is always /0 terminated) \end{verbatim}
The following subchunks are contained in the import table data area: 'VAR_' for imported global variables 'FUNC' for imported global functions (not yet fully implemented) 'DECL' for imported declarations (not yet supported)
GlobalVariables 'VAR_': \begin{verbatim} Offset Size Type Comment --------------------------------------------------------- 0 4 Byte fourcc 'VAR_' (VARiable) 4 4 Byte int32 size of the chunk 8 x Byte string name of the variable
- 4 Byte int32 hashcode over the type to detect type errors during linking
- y Byte chunks subchunks containing additional information like relocate (code patch address) information --------------------------------------------------------- (string is always /0 terminated) \end{verbatim} GlobalVariables 'FUNC': \begin{verbatim} Offset Size Type Comment --------------------------------------------------------- 0 4 Byte fourcc 'VAR_' (VARiable) 4 4 Byte int32 size of the chunk 8 x Byte string name of the function
- 4 Byte int32 hashcode over the type and parameters to detect type errors during linking
- y Byte chunks subchunks containing additional information like relocate (code patch address) information --------------------------------------------------------- (string is always /0 terminated) \end{verbatim}
The subchunks 'VAR_' and 'FUNC' of the import table are all containing additional informations in subchunks (here already sub-subchunks). The contained information is of the following format:
Subchunk 'RLOC' used in 'VAR_' and 'FUNC': \begin{verbatim} Offset Size Type Comment --------------------------------------------------------- 0 4 Byte fourcc 'RLOC' (ReLOCate) 4 4 Byte int32 size of the chunk 8 4 Byte int32 base address (1st address to patch) 12 4 Byte int32 number of patches 16 x Byte byte delta address offsets from base address in acending order of addresses --------------------------------------------------------- (string is always /0 terminated) \end{verbatim}
The documentation for this class was generated from the following file:
|