GEOS 3.3.8

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

- File List

geomgraph/GraphComponent.h
1 /**********************************************************************
2 * $Id: GraphComponent.h 2557 2009-06-08 09:30:55Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: geomgraph/GraphComponent.java rev. 1.3 (JTS-1.10)
18 *
19 **********************************************************************/
20
21
22 #ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
23 #define GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
24
25 #include <geos/export.h>
26 #include <geos/inline.h>
27
28 // Forward declarations
29 namespace geos {
30 namespace geom {
31 class IntersectionMatrix;
32 }
33 namespace geomgraph {
34 class Label;
35 }
36 }
37
38 namespace geos {
39 namespace geomgraph { // geos.geomgraph
40
41
42 class GEOS_DLL GraphComponent {
43 public:
44 GraphComponent();
45
46 /*
47 * GraphComponent takes ownership of the given Label.
48 * newLabel is deleted by destructor.
49 */
50 GraphComponent(Label* newLabel);
51 virtual ~GraphComponent();
52 Label* getLabel();
53 virtual void setLabel(Label* newLabel);
54 virtual void setInResult(bool isInResult) { isInResultVar=isInResult; }
55 virtual bool isInResult() const { return isInResultVar; }
56 virtual void setCovered(bool isCovered);
57 virtual bool isCovered() const { return isCoveredVar; }
58 virtual bool isCoveredSet() const { return isCoveredSetVar; }
59 virtual bool isVisited() const { return isVisitedVar; }
60 virtual void setVisited(bool isVisited) { isVisitedVar = isVisited; }
61 virtual bool isIsolated() const=0;
62 virtual void updateIM(geom::IntersectionMatrix *im);
63 protected:
64 Label* label;
65 virtual void computeIM(geom::IntersectionMatrix *im)=0;
66 private:
67 bool isInResultVar;
68 bool isCoveredVar;
69 bool isCoveredSetVar;
70 bool isVisitedVar;
71 };
72
73 } // namespace geos.geomgraph
74 } // namespace geos
75
76 //#ifdef GEOS_INLINE
77 //# include "geos/geomgraph/GraphComponent.inl"
78 //#endif
79
80 #endif // ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
81
82 /**********************************************************************
83 * $Log$
84 * Revision 1.2 2006/03/24 09:52:41 strk
85 * USE_INLINE => GEOS_INLINE
86 *
87 * Revision 1.1 2006/03/09 16:46:49 strk
88 * geos::geom namespace definition, first pass at headers split
89 *
90 **********************************************************************/
91