# EdgeNodingValidator.h

    00001 /**********************************************************************
    00002  * $Id: EdgeNodingValidator.h 1939 2006-12-11 17:42:55Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2005-2006 Refractions Research Inc.
    00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00009  *
    00010  * This is free software; you can redistribute and/or modify it under
    00011  * the terms of the GNU Lesser General Public Licence as published
    00012  * by the Free Software Foundation.
    00013  * See the COPYING file for more information.
    00014  *
    00015  **********************************************************************/
    00016
    00017
    00018 #ifndef GEOS_GEOMGRAPH_EDGENODINGVALIDATOR_H
    00019 #define GEOS_GEOMGRAPH_EDGENODINGVALIDATOR_H
    00020
    00021 #include <vector>
    00022
    00023 //#include <geos/noding/NodingValidator.h> // for composition
    00024 #include <geos/noding/FastNodingValidator.h> // for composition
    00025
    00026 #include <geos/inline.h>
    00027
    00028 // Forward declarations
    00029 namespace geos {
    00030         namespace geom {
    00031                 class CoordinateSequence;
    00032         }
    00033         namespace noding {
    00034                 class SegmentString;
    00035         }
    00036         namespace geomgraph {
    00037                 class Edge;
    00038         }
    00039 }
    00040
    00041 namespace geos {
    00042 namespace geomgraph { // geos.geomgraph
    00043
    00050 class EdgeNodingValidator {
    00051
    00052 private:
    00053         std::vector<noding::SegmentString*>& toSegmentStrings(std::vector<Edge*>& edges);
    00054
    00055         // Make sure this member is initialized *before*
    00056         // the NodingValidator, as initialization of
    00057         // NodingValidator will use toSegmentString(), that
    00058         // in turn expects this member to be initialized
    00059         std::vector<noding::SegmentString*> segStr;
    00060
    00061         // Make sure this member is initialized *before*
    00062         // the NodingValidator, as initialization of
    00063         // NodingValidator will use toSegmentString(), that
    00064         // in turn expects this member to be initialized
    00065         std::vector<geom::CoordinateSequence*> newCoordSeq;
    00066
    00067         noding::FastNodingValidator nv;
    00068         //noding::NodingValidator nv;
    00069
    00070 public:
    00071
    00072         EdgeNodingValidator(std::vector<Edge*>& edges)
    00073                 :
    00074                 segStr(),
    00075                 newCoordSeq(),
    00076                 nv(toSegmentStrings(edges))
    00077         {}
    00078
    00079         ~EdgeNodingValidator();
    00080
    00081         void checkValid() { nv.checkValid(); }
    00082 };
    00083
    00084
    00085 } // namespace geos.geomgraph
    00086 } // namespace geos
    00087
    00088 //#ifdef GEOS_INLINE
    00089 //# include "geos/geomgraph/EdgeNodingValidator.inl"
    00090 //#endif
    00091
    00092 #endif // ifndef GEOS_GEOMGRAPH_EDGENODINGVALIDATOR_H
    00093
    00094 /**********************************************************************
    00095  * $Log$
    00096  * Revision 1.2  2006/03/24 09:52:41  strk
    00097  * USE_INLINE => GEOS_INLINE
    00098  *
    00099  * Revision 1.1  2006/03/09 16:46:49  strk
    00100  * geos::geom namespace definition, first pass at headers split
    00101  *
    00102  **********************************************************************/
    00103