uk.me.parabola.imgfmt.app.net
Class TableA

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.net.TableA

public class TableA
extends java.lang.Object

Table A that contains road information for segments in one RouteCenter. Each arc starting from a node in the RouteCenter has an associated entry in Table A, shared by the inverse arc for internal arcs. This entry consists of some routing parameters and a link to the road in NET.


Constructor Summary
TableA()
           
 
Method Summary
 void addArc(RouteArc arc)
          Add an arc to the table if not present and set its index.
 byte getIndex(RouteArc arc)
          Retrieve an arc's index.
 byte getNumberOfItems()
          Retrieve the size of the table as byte.
 int numFerryArcs()
           
 int numUnpavedArcs()
           
 int size()
          Retrieve the size of the Table as an int.
 void write(ImgFileWriter writer)
          This is called first to reserve enough space.
 void writePost(ImgFileWriter writer)
          Fill in the table once the NET offsets of the roads are known.
 void writePost(ImgFileWriter writer, uk.me.parabola.imgfmt.app.net.TableA.Arc arc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableA

public TableA()
Method Detail

addArc

public void addArc(RouteArc arc)
Add an arc to the table if not present and set its index. The value may overflow while it isn't certain that the table fulfills the size constraint.


getIndex

public byte getIndex(RouteArc arc)
Retrieve an arc's index.


size

public int size()
Retrieve the size of the Table as an int. While Table A is limited to byte size (0x100 entries), we temporarily build larger tables while subdividing the network.


numUnpavedArcs

public int numUnpavedArcs()

numFerryArcs

public int numFerryArcs()

getNumberOfItems

public byte getNumberOfItems()
Retrieve the size of the table as byte. This value is what should be written to the table header. When this is read, the table is assumed to be fit for writing, so at this point we check it isn't too large.


write

public void write(ImgFileWriter writer)
This is called first to reserve enough space. It will be rewritten later.


writePost

public void writePost(ImgFileWriter writer)
Fill in the table once the NET offsets of the roads are known.


writePost

public void writePost(ImgFileWriter writer,
                      uk.me.parabola.imgfmt.app.net.TableA.Arc arc)