ItemBoundable.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/index/strtree/Boundable.h> // for inheritance
namespace geos {
namespace index { // geos::index
namespace strtree { // geos::index::strtree
class GEOS_DLL ItemBoundable: public Boundable {
public:
ItemBoundable(const void* newBounds, void* newItem) : bounds(newBounds), item(newItem) {}
~ItemBoundable() override = default;
bool isLeaf() const override {
return true;
}
const void* getBounds() const override {
return bounds;
}
void* getItem() const {
return item;
}
private:
const void* bounds;
void* item;
};
} // namespace geos::index::strtree
} // namespace geos::index
} // namespace geos
geos::index::strtree::Boundable
A spatial object in an AbstractSTRtree.
Definition Boundable.h:24
geos::index::strtree::ItemBoundable::getBounds
const void * getBounds() const override
Definition ItemBoundable.h:42
geos::index::strtree
Contains 2-D and 1-D versions of the Sort-Tile-Recursive (STR) tree, a query-only R-tree.
Definition AbstractNode.h:31
geos::index
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38