File Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/CPP/geos.x/i/geos/index/chain/MonotoneChainOverlapAction.h
Criterion Covered Total %
statement 1 1 100.0
branch 3 6 50.0
condition n/a
subroutine n/a
pod n/a
total 4 7 57.1


line stmt bran cond sub pod time code
1             /**********************************************************************
2             *
3             * GEOS - Geometry Engine Open Source
4             * http://geos.osgeo.org
5             *
6             * Copyright (C) 2001-2002 Vivid Solutions Inc.
7             *
8             * This is free software; you can redistribute and/or modify it under
9             * the terms of the GNU Lesser General Public Licence as published
10             * by the Free Software Foundation.
11             * See the COPYING file for more information.
12             *
13             **********************************************************************
14             *
15             * Last port: index/chain/MonotoneChainOverlapAction.java rev. 1.6 (JTS-1.10)
16             *
17             **********************************************************************/
18              
19             #ifndef GEOS_IDX_CHAIN_MONOTONECHAINOVERLAPACTION_H
20             #define GEOS_IDX_CHAIN_MONOTONECHAINOVERLAPACTION_H
21              
22             #include
23             #include
24             #include
25              
26              
27             // Forward declarations
28             namespace geos {
29             namespace index {
30             namespace chain {
31             class MonotoneChain;
32             }
33             }
34             }
35              
36             namespace geos {
37             namespace index { // geos::index
38             namespace chain { // geos::index::chain
39              
40             /**
41             * The action for the internal iterator for performing
42             * overlap queries on a MonotoneChain
43             */
44             class GEOS_DLL MonotoneChainOverlapAction {
45              
46             protected:
47              
48             geom::LineSegment overlapSeg1;
49              
50             geom::LineSegment overlapSeg2;
51              
52             public:
53              
54 1 50         MonotoneChainOverlapAction() {}
    50          
    50          
55              
56             virtual ~MonotoneChainOverlapAction() {}
57              
58             /**
59             * This function can be overridden if the original chains are needed
60             *
61             * @param start1 the index of the start of the overlapping segment
62             * from mc1
63             * @param start2 the index of the start of the overlapping segment
64             * from mc2
65             */
66             virtual void overlap(MonotoneChain& mc1, std::size_t start1,
67             MonotoneChain& mc2, std::size_t start2);
68              
69             /**
70             * This is a convenience function which can be overridden to
71             * obtain the actual line segments which overlap
72             * @param seg1
73             * @param seg2
74             */
75             virtual void overlap(const geom::LineSegment& /*seg1*/,
76             const geom::LineSegment& /*seg2*/)
77             {}
78              
79             // these envelopes are used during the MonotoneChain search process
80             geom::Envelope tempEnv1;
81             geom::Envelope tempEnv2;
82             };
83              
84             } // namespace geos::index::chain
85             } // namespace geos::index
86             } // namespace geos
87              
88             #endif // GEOS_IDX_CHAIN_MONOTONECHAINOVERLAPACTION_H
89