coolray.org FAQ Contact Us
CoolRay Banner
CoolRay / Documentation
Main Page   Class Hierarchy   Compound List   Compound Members   Related Pages  

ObjectFile Class Reference

The class ObjectFile represent the compiled scene or library file. More...

#include <ObjectFile.h>

Collaboration diagram for ObjectFile:

Collaboration graph
[legend]
List of all members.

Public Methods

 ObjectFile ()
 ~ObjectFile ()
void setHeader (long type,long version,const string &name)
 create and add a new header to the object file.

const string& getAutor ()const
void setAuthor (const string &date)
const string& getDate ()const
void setDate (const string &date)
long getLanguageVersion ()const
void setLanguageVersion (long version)
long getModuleVersion ()const
void setModuleVersion (long version)
void reserveCode (unsigned long size) throw (bad_alloc)
void appendCode (unsigned long size,const void *src) throw (bad_alloc)
void setCode (unsigned long offset,unsigned long size,const void *src) throw (bad_alloc)
void getCode (unsigned long offset,unsigned long size,void *dst)const
unsigned long getCodeSize ()const throw ()
unsigned long getCodeReserved ()const throw ()
unsigned long getStartAddress ()const throw ()
void setStartAddress (unsigned long address) throw ()
const void* getCodeBase ()const throw ()
void setBSSSize (unsigned long size) throw (bad_alloc)
unsigned long getBSSSize ()const throw ()
void setBSSBaseAddress (unsigned long address) throw (bad_alloc)
unsigned long getBSSBaseAddress ()const throw ()
long addVariable (const Type &type,const string &name,unsigned long offset)
const Type& getVariableType (long index)const
const string& getVariableName (long index)const
unsigned long getVariableOffset (long index)const
void write (OutputStreamWriterNDR &os)
 Write the ObjectFile to a stream. More...

void read (InputStreamWriterNDR &is)
 Read the ObjectFile from a stream. More...


Protected Methods

void deleteContained ()

Protected Attributes

ObjectFileHeaderm_pHeader
ObjectFileMetaInfom_pMetaInfo
ObjectFileCodem_pCode
ObjectFileExportTablem_pExportTable
ObjectFileBSSm_pBSS
ObjectFileInternalSection* m_pSymbolSection
std::vector<ObjectFileImportTable*> m_ImportTables

Detailed Description

The class ObjectFile represent the compiled scene or library file.

It contains the object code for the virtual machine and some additional information.

The class is the facade of serveral concrete DataChunks, carring the data needed (e.g. code, data, symbol information).

See also:
DataChunk


Member Function Documentation

long ObjectFile::addVariable ( const Type & type,
const string & name,
unsigned long offset )
 

Returns:
index (useable in a ILOAD or ISTORE method)

void ObjectFile::read ( InputStreamWriterNDR & is )
 

Read the ObjectFile from a stream.

Parameters:
is   input stream
Exceptions:
WrongFileFormatException  
FileCorruptException  

void ObjectFile::write ( OutputStreamWriterNDR & os )
 

Write the ObjectFile to a stream.

Parameters:
os   output stream
Exceptions:
IOException  


The documentation for this class was generated from the following file:
  • ObjectFile.h
You are visitor No.

counter

Copyright (c) 2001 Stefan Michel, All Rights Reserved.
Last modified: