1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.refractions.net
6 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
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.
15 **********************************************************************
17 * Last port: geomgraph/GraphComponent.java r428 (JTS-1.12+)
19 **********************************************************************/
22 #ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
23 #define GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
25 #include <geos/export.h>
26 #include <geos/inline.h>
28 #include <geos/geomgraph/Label.h>
30 // Forward declarations
33 class IntersectionMatrix
;
38 namespace geomgraph
{ // geos.geomgraph
42 * A GraphComponent is the parent class for the objects'
45 * Each GraphComponent can carry a Label.
47 class GEOS_DLL GraphComponent
{
52 * GraphComponent copies the given Label.
54 GraphComponent(const Label
& newLabel
);
55 virtual ~GraphComponent();
57 Label
& getLabel() { return label
; }
58 const Label
& getLabel() const { return label
; }
59 void setLabel(const Label
& newLabel
) { label
= newLabel
; }
61 virtual void setInResult(bool isInResult
) { isInResultVar
=isInResult
; }
62 virtual bool isInResult() const { return isInResultVar
; }
63 virtual void setCovered(bool isCovered
);
64 virtual bool isCovered() const { return isCoveredVar
; }
65 virtual bool isCoveredSet() const { return isCoveredSetVar
; }
66 virtual bool isVisited() const { return isVisitedVar
; }
67 virtual void setVisited(bool isVisited
) { isVisitedVar
= isVisited
; }
68 virtual bool isIsolated() const=0;
69 virtual void updateIM(geom::IntersectionMatrix
& im
);
72 virtual void computeIM(geom::IntersectionMatrix
& im
)=0;
80 } // namespace geos.geomgraph
83 #endif // ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H