GEOS  3.3.3
EdgeString.h
1 /**********************************************************************
2  * $Id: EdgeString.h 3309 2011-04-27 15:47:14Z strk $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
8  * Copyright (C) 2006 Refractions Research Inc.
9  * Copyright (C) 2001-2002 Vivid Solutions Inc.
10  *
11  * This is free software; you can redistribute and/or modify it under
12  * the terms of the GNU Lesser General Public Licence as published
13  * by the Free Software Foundation.
14  * See the COPYING file for more information.
15  *
16  **********************************************************************
17  *
18  * Last port: operation/linemerge/EdgeString.java r378 (JTS-1.12)
19  *
20  **********************************************************************/
21 
22 #ifndef GEOS_OP_LINEMERGE_EDGESTRING_H
23 #define GEOS_OP_LINEMERGE_EDGESTRING_H
24 
25 #include <geos/export.h>
26 #include <vector>
27 
28 #ifdef _MSC_VER
29 #pragma warning(push)
30 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31 #endif
32 
33 // Forward declarations
34 namespace geos {
35  namespace geom {
36  class GeometryFactory;
37  class CoordinateSequence;
38  class LineString;
39  }
40  namespace operation {
41  namespace linemerge {
43  }
44  }
45 }
46 
47 namespace geos {
48 namespace operation { // geos::operation
49 namespace linemerge { // geos::operation::linemerge
50 
56 class GEOS_DLL EdgeString {
57 private:
58  const geom::GeometryFactory *factory;
59  std::vector<LineMergeDirectedEdge*> directedEdges;
60  geom::CoordinateSequence *coordinates;
61  geom::CoordinateSequence* getCoordinates();
62 public:
63  /*
64  * \brief
65  * Constructs an EdgeString with the given factory used to
66  * convert this EdgeString to a LineString
67  */
68  EdgeString(const geom::GeometryFactory *newFactory);
69 
70  ~EdgeString();
71 
75  void add(LineMergeDirectedEdge *directedEdge);
76 
77  /*
78  * Converts this EdgeString into a LineString.
79  */
80  geom::LineString* toLineString();
81 };
82 
83 } // namespace geos::operation::linemerge
84 } // namespace geos::operation
85 } // namespace geos
86 
87 #ifdef _MSC_VER
88 #pragma warning(pop)
89 #endif
90 
91 #endif // GEOS_OP_LINEMERGE_EDGESTRING_H
92 
93 /**********************************************************************
94  * $Log$
95  * Revision 1.1 2006/03/22 10:13:53 strk
96  * opLinemerge.h split
97  *
98  **********************************************************************/