RomRep::HeaderCalculator Class Reference

Inheritance diagram for RomRep::HeaderCalculator:

RomRep::DevHeaderCalculator RomRep::ITBHeaderCalculator RomRep::NGHeaderCalculator RomRep::NGRowHeaderCalculator RomRep::VT0ColumnHeaderCalculator RomRep::VT0RowHeaderCalculator List of all members.

Public Member Functions

 HeaderCalculator (Object *map, Object *hondaecu)
virtual bool canEditHeader (bool column, int columnOrRow)
virtual RomRep::MapHeaderChangeArgscalculateHeaders (bool col, int columnOrRow)=0
virtual RomRep::MapHeaderChangeArgsbyteChangeNotify (ByteChange *bc)
virtual RomRep::ByteChangesetRowHeader (int row, String *val)[]
virtual RomRep::ByteChangesetColumnHeader (int col, String *val)[]
 see setRow Header.
virtual void mapHeaderChanged (MapHeaderChangeArgs *args)
virtual float getReferenceArray () __gc[]=0

Protected Attributes

Object * m_map
Object * m_hondaecu

Detailed Description

Most likely, this Object will need to know about the HondaEcu object that owns the Map object (which the Map object does not know). This is easy to get around by having the HondaEcu object as a member of the derived class (ben, have the hondaEcu class or some script create these!).


Constructor & Destructor Documentation

RomRep::HeaderCalculator::HeaderCalculator Object *  map,
Object *  hondaecu
 


Member Function Documentation

virtual RomRep::MapHeaderChangeArgs* RomRep::HeaderCalculator::byteChangeNotify ByteChange bc  )  [virtual]
 

This will be called when a byte changes in the Rom. You can then decide to or not to update your state (if necessary) and return a MapHeaderChangeArgs object. If the object you return is NOT null, then the Map will pretty much blindly dump the string array contents into its header arrays and fire the appreoriate events for the UI.

Reimplemented in RomRep::DevHeaderCalculator, RomRep::ITBHeaderCalculator, and RomRep::NGHeaderCalculator.

virtual RomRep::MapHeaderChangeArgs* RomRep::HeaderCalculator::calculateHeaders bool  col,
int  columnOrRow
[pure virtual]
 

This is used by the map at least initially when the map is setup by passing a HEADER_EVENT_ALL int into the column or row to indicate it wants all headers. This object should know about the map its being called on so a mechanism for grabbing the header location(s) should be in place.

Implemented in RomRep::DevHeaderCalculator, RomRep::ITBHeaderCalculator, RomRep::NGHeaderCalculator, RomRep::NGRowHeaderCalculator, RomRep::VT0ColumnHeaderCalculator, and RomRep::VT0RowHeaderCalculator.

virtual bool RomRep::HeaderCalculator::canEditHeader bool  column,
int  columnOrRow
[virtual]
 

Called when the client (a grid page or something) needs to know whether some header can be edited.

Reimplemented in RomRep::DevHeaderCalculator, and RomRep::ITBHeaderCalculator.

virtual float RomRep::HeaderCalculator::getReferenceArray  )  [pure virtual]
 

This is a reference array mostly for the interpolation. It should be some set of values that all share the same unit for these headers. i.e. an array of rpm values (row headers) or load values (col headers) raw or otherwise

Implemented in RomRep::DevHeaderCalculator, RomRep::ITBHeaderCalculator, RomRep::NGHeaderCalculator, RomRep::NGRowHeaderCalculator, RomRep::VT0ColumnHeaderCalculator, and RomRep::VT0RowHeaderCalculator.

void RomRep::HeaderCalculator::mapHeaderChanged MapHeaderChangeArgs args  )  [virtual]
 

Splits up the MapHeaderChangeArgs calls into setRowHeader and setColumnHeader calls. This does not need to be overriden

virtual RomRep::ByteChange* RomRep::HeaderCalculator::setColumnHeader int  col,
String *  val
[virtual]
 

see setRow Header.

Reimplemented in RomRep::DevHeaderCalculator, and RomRep::ITBHeaderCalculator.

virtual RomRep::ByteChange* RomRep::HeaderCalculator::setRowHeader int  row,
String *  val
[virtual]
 

These set functions should take the string, use a regex and try to extract the data. If possible, they will calculate the byte(s) to be changed and do a send byte request to the owning map.


Member Data Documentation

Object* RomRep::HeaderCalculator::m_hondaecu [protected]
 

Object* RomRep::HeaderCalculator::m_map [protected]
 




BRE Documentation Home