GEOS: EdgeString.h Source File

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# EdgeString.h

    00001 /**********************************************************************
    00002  * $Id: EdgeString.h 3309 2011-04-27 15:47:14Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
    00008  * Copyright (C) 2006 Refractions Research Inc.
    00009  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00010  *
    00011  * This is free software; you can redistribute and/or modify it under
    00012  * the terms of the GNU Lesser General Public Licence as published
    00013  * by the Free Software Foundation.
    00014  * See the COPYING file for more information.
    00015  *
    00016  **********************************************************************
    00017  *
    00018  * Last port: operation/linemerge/EdgeString.java r378 (JTS-1.12)
    00019  *
    00020  **********************************************************************/
    00021
    00022 #ifndef GEOS_OP_LINEMERGE_EDGESTRING_H
    00023 #define GEOS_OP_LINEMERGE_EDGESTRING_H
    00024
    00025 #include <geos/export.h>
    00026 #include <vector>
    00027
    00028 #ifdef _MSC_VER
    00029 #pragma warning(push)
    00030 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
    00031 #endif
    00032
    00033 // Forward declarations
    00034 namespace geos {
    00035         namespace geom {
    00036                 class GeometryFactory;
    00037                 class CoordinateSequence;
    00038                 class LineString;
    00039         }
    00040         namespace operation {
    00041                 namespace linemerge {
    00042                         class LineMergeDirectedEdge;
    00043                 }
    00044         }
    00045 }
    00046
    00047 namespace geos {
    00048 namespace operation { // geos::operation
    00049 namespace linemerge { // geos::operation::linemerge
    00050
    00056 class GEOS_DLL EdgeString {
    00057 private:
    00058         const geom::GeometryFactory *factory;
    00059         std::vector<LineMergeDirectedEdge*> directedEdges;
    00060         geom::CoordinateSequence *coordinates;
    00061         geom::CoordinateSequence* getCoordinates();
    00062 public:
    00063         /*
    00064          * \brief
    00065          * Constructs an EdgeString with the given factory used to
    00066          * convert this EdgeString to a LineString
    00067          */
    00068         EdgeString(const geom::GeometryFactory *newFactory);
    00069
    00070         ~EdgeString();
    00071
    00075         void add(LineMergeDirectedEdge *directedEdge);
    00076
    00077         /*
    00078          * Converts this EdgeString into a LineString.
    00079          */
    00080         geom::LineString* toLineString();
    00081 };
    00082
    00083 } // namespace geos::operation::linemerge
    00084 } // namespace geos::operation
    00085 } // namespace geos
    00086
    00087 #ifdef _MSC_VER
    00088 #pragma warning(pop)
    00089 #endif
    00090
    00091 #endif // GEOS_OP_LINEMERGE_EDGESTRING_H
    00092
    00093 /**********************************************************************
    00094  * $Log$
    00095  * Revision 1.1  2006/03/22 10:13:53  strk
    00096  * opLinemerge.h split
    00097  *
    00098  **********************************************************************/