IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
RTree.h
1 // RTree.h:
3 // --------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_RTREE_H__
16 #define __IPSDKGEOMETRY_RTREE_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::geom::RTree<T>::_rtree': class 'boost::geometry::index::rtree<std::pair<T,ipsdk::ipUInt32>,boost::geometry::index::quadratic<16,4>,boost::geometry::index::indexable<Value>,boost::geometry::index::equal_to<Value>,std::allocator<Value>>' needs to have dll-interface to be used by clients of class 'ipsdk::geom::RTree<T>'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
24 #include <IPSDKSerialization/Engine/BaseSerializationObject.h>
26 #include <boost/geometry/index/rtree.hpp>
27 
28 // Anticipating Boost 1.75
29 #include <boost/geometry/geometry.hpp>
30 #include <boost/geometry/core/coordinate_system.hpp>
31 #include <boost/geometry/geometries/segment.hpp>
32 #include <boost/geometry/index/predicates.hpp>
33 
34 namespace ipsdk {
35 namespace geom {
36 
39 
40 template <typename T>
42 {
43  // declare serial class
45 
46 // predefined public types
47 public:
50 
52  typedef std::pair<T, ipUInt32> RTreeDataType;
53 
55  typedef boost::geometry::index::rtree<RTreeDataType, boost::geometry::index::quadratic<16> > RTreeType;
56 
57 public:
60  RTree();
61  template <typename Range>
62  RTree(const Range& range) :
63  _rtree(range)
64  {}
65  ~RTree();
67 
68 // methods
69 public:
71  const RTreeType& getRTree() const;
72 
74  ipUInt32 getNbData() const;
75 
77  void clear();
78 
79 // attributes
80 protected:
83 };
84 
87 
88 } // end of namespace geom
89 } // end of namespace ipsdk
90 
91 #pragma warning (pop)
92 
93 #endif // __IPSDKGEOMETRY_RTREE_H__
#define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:73
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::geometry::index::rtree< RTreeDataType, boost::geometry::index::quadratic< 16 > > RTreeType
underlying rtree object type
Definition: RTree.h:55
std::pair< T, ipUInt32 > RTreeDataType
indexable value type associated to rtree data
Definition: RTree.h:52
T GeometricEntityType
geometric entity type associated to rtree data
Definition: RTree.h:49
RTreeType _rtree
underlying rtree object
Definition: RTree.h:82
Definition of import/export macro for library.
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
predefined types for RTree objects management
Class allowing to encapsulate boost::geometry::rtree.
Definition: RTree.h:41
Base class for serializable class.
Definition: BaseSerializationObject.h:33
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53