~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to include/spatialindex/capi/ObjVisitor.h

  • Committer: fangf at ac
  • Date: 2012-11-06 12:21:31 UTC
  • mto: This revision was merged to the branch mainline in revision 3989.
  • Revision ID: fangf@imperial.ac.uk-20121106122131-u2zvt7fxc1r3zeou
updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * $Id: objvisitor.hpp 1385 2009-08-13 15:45:16Z hobu $
 
3
 *
 
4
 * Project:  libsidx - A C API wrapper around libspatialindex
 
5
 * Purpose:  C++ object declarations to implement the object visitor.
 
6
 * Author:   Howard Butler, hobu.inc@gmail.com
 
7
 *
 
8
 ******************************************************************************
 
9
 * Copyright (c) 2009, Howard Butler
 
10
 *
 
11
 * All rights reserved.
 
12
 * 
 
13
 * This library is free software; you can redistribute it and/or modify it under
 
14
 * the terms of the GNU Lesser General Public License as published by the Free
 
15
 * Software Foundation; either version 2.1 of the License, or (at your option)
 
16
 * any later version.
 
17
 
 
18
 * This library is distributed in the hope that it will be useful, but WITHOUT
 
19
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
20
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
 
21
 * details.
 
22
 * 
 
23
 * You should have received a copy of the GNU Lesser General Public License 
 
24
 * along with this library; if not, write to the Free Software Foundation, Inc.,
 
25
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
26
 ****************************************************************************/
 
27
 
 
28
#pragma once
 
29
 
 
30
class ObjVisitor : public SpatialIndex::IVisitor
 
31
{
 
32
private:
 
33
    std::vector<SpatialIndex::IData*> m_vector;
 
34
    uint64_t nResults;
 
35
 
 
36
public:
 
37
 
 
38
    ObjVisitor();
 
39
    ~ObjVisitor();
 
40
 
 
41
    uint32_t GetResultCount() const { return nResults; }
 
42
    std::vector<SpatialIndex::IData*>& GetResults()  { return m_vector; }
 
43
    
 
44
    void visitNode(const SpatialIndex::INode& n);
 
45
    void visitData(const SpatialIndex::IData& d);
 
46
    void visitData(std::vector<const SpatialIndex::IData*>& v);
 
47
};
 
48