root/spatialindex/trunk/src/capi/CountVisitor.cc @ 173

Revision 173, 1.5 KB (checked in by hobu, 6 months ago)

add CountVisitor? to the CAPI to provide a cumulation of the number of hits that land within a query

Line 
1
2/******************************************************************************
3* $Id$
4*
5* Project:  libsidx - A C API wrapper around libspatialindex
6* Purpose:  C++ objects to implement the count visitor.
7* Author:   Leonard NorrgÃ¥rd, leonard.norrgard@refactor.fi
8*
9******************************************************************************
10* Copyright (c) 2010, Leonard Norrgård
11*
12* All rights reserved.
13*
14* This library is free software; you can redistribute it and/or modify it under
15* the terms of the GNU Lesser General Public License as published by the Free
16* Software Foundation; either version 2.1 of the License, or (at your option)
17* any later version.
18
19* This library is distributed in the hope that it will be useful, but WITHOUT
20* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21* FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
22* details.
23*
24* You should have received a copy of the GNU Lesser General Public License
25* along with this library; if not, write to the Free Software Foundation, Inc.,
26* 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
27****************************************************************************/
28
29#include "sidx_impl.h"
30
31CountVisitor::CountVisitor(): nResults(0)
32{
33}
34
35CountVisitor::~CountVisitor()
36{
37
38}
39
40void CountVisitor::visitNode(const SpatialIndex::INode& n)
41{
42
43}
44
45void CountVisitor::visitData(const SpatialIndex::IData& d)
46{
47   nResults += 1;
48}
49
50void CountVisitor::visitData(std::vector<const SpatialIndex::IData*>& v)
51{
52}
Note: See TracBrowser for help on using the browser.