uk.me.parabola.imgfmt.app.mdr
Class Mdr7

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.mdr.ConfigBase
      extended by uk.me.parabola.imgfmt.app.mdr.MdrSection
          extended by uk.me.parabola.imgfmt.app.mdr.MdrMapSection
              extended by uk.me.parabola.imgfmt.app.mdr.Mdr7

public class Mdr7
extends MdrMapSection

The MDR 7 section is a list of all streets. Only street names are saved and so I believe that the NET section is required to make this work.

Author:
Steve Ratcliffe

Constructor Summary
Mdr7(MdrConfig config)
           
 
Method Summary
 void addStreet(int mapId, java.lang.String name, int lblOffset, int strOff)
           
 int getExtraValue()
          Value of 3 possibly the existence of the lbl field.
 int getItemSize()
          The size of a record in the section.
 int getNumberOfItems()
          The number of records in this section.
 int getPointerSize()
          Get the size of an integer that is sufficient to store a record number from this section.
 void writeSectData(ImgFileWriter writer)
          Write out the contents of this section.
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.MdrMapSection
addIndexPointer, init, putCityIndex, putPoiIndex, putRegionIndex, setMapIndex
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.MdrSection
getSizes, numberToPointerSize, putMapIndex, putN, putStringOffset, setSizes
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.ConfigBase
getConfig, isForDevice, setConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mdr7

public Mdr7(MdrConfig config)
Method Detail

addStreet

public void addStreet(int mapId,
                      java.lang.String name,
                      int lblOffset,
                      int strOff)

writeSectData

public void writeSectData(ImgFileWriter writer)
Description copied from class: MdrSection
Write out the contents of this section.

Specified by:
writeSectData in class MdrSection
Parameters:
writer - Where to write it.

getItemSize

public int getItemSize()
Description copied from class: MdrSection
The size of a record in the section. This is not a constant and might vary on various factors, such as the file version, if we are preparing for a device, the number of maps etc.

Specified by:
getItemSize in class MdrSection
Returns:
The size of a record in this section.

getNumberOfItems

public int getNumberOfItems()
Description copied from class: MdrMapSection
The number of records in this section.

Specified by:
getNumberOfItems in class MdrMapSection
Returns:
The number of items in the section.

getPointerSize

public int getPointerSize()
Get the size of an integer that is sufficient to store a record number from this section.

Specified by:
getPointerSize in class MdrMapSection
Returns:
A number between 1 and 4 giving the number of bytes required to store the largest record number in this section.

getExtraValue

public int getExtraValue()
Value of 3 possibly the existence of the lbl field.

Specified by:
getExtraValue in class MdrMapSection
Returns:
The correct value based on the contents of the section. Zero if nothing needs to be done.