BE-GRAPHE.2020-2021/src/main/org/insa/graph/io/GraphReaderObserver.java
2018-02-27 23:23:22 +01:00

64 lines
1.5 KiB
Java

package org.insa.graph.io;
import org.insa.graph.Arc;
import org.insa.graph.Node;
import org.insa.graph.RoadInformation;
public interface GraphReaderObserver {
/**
* Notify observer about information on the graph, this method is always the
* first called
*
* @param mapId ID of the graph.
*/
public void notifyStartReading(int mapId);
/**
* Notify that the graph has been fully read.
*/
public void notifyEndReading();
/**
* Notify that the reader is starting to read node.
*
* @param nNodes Number of nodes to read.
*/
public void notifyStartReadingNodes(int nNodes);
/**
* Notify that a new nodes has been read.
*
* @param node
*/
public void notifyNewNodeRead(Node node);
/**
* Notify that the reader is starting to read descriptor/road informations.
*
* @param nDesc Number of descriptors to read.
*/
public void notifyStartReadingDescriptors(int nDesc);
/**
* Notify that a new descriptor has been read.
*
* @param desc
*/
public void notifyNewDescriptorRead(RoadInformation desc);
/**
* Notify that the reader is starting to read arcs.
*
* @param nArcs Number of arcs to read (!= number of arcs in the graph).
*/
public void notifyStartReadingArcs(int nArcs);
/**
* Notify that a new arc has been read.
*
* @param arc
*/
public void notifyNewArcRead(Arc arc);
}