1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package safeluck.drive.evaluation.routecollect;
 
import safeluck.drive.evaluation.routecollect.impl.RouteModel;
 
/**
 * DriveJudge
 * Created by lzw on 2020/9/16. 10:08:18
 * 邮箱:632393724@qq.com
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class RouteCollectController implements ILoadListener {
 
    ICollectView iCollectView;
    RouteModel routeModel;
 
 
    public void RouteCollectController(ICollectView collectView){
        this.iCollectView = collectView;
        routeModel = new RouteModel();
    }
 
    public void startCollect() {
        if (iCollectView != null){
            iCollectView.beginCollectView();
        }
        if (routeModel != null){
            routeModel.startCollect(this);
        }
    }
 
    public void endCollect(){
        if (iCollectView != null){
            iCollectView.endCollectView();
        }
    }
 
    @Override
    public void finishCollectItem(CollectPointResult collectPointResult) {
        if (iCollectView != null){
            iCollectView.endCollectView();
            iCollectView.routeItem(collectPointResult);
        }
    }
}