IPointKernelEx.hpp
1 #ifndef DM_IPOINT_KERNEL_EX_HPP_INCLUDED
2 #define DM_IPOINT_KERNEL_EX_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/Handle.hpp"
10 #include "DM/ObjectBase.hpp"
11 #include "DM/IPoint.hpp"
12 #include "DM/IPointIndexLeaf.hpp"
13 
14 DM_NAMESPACE_BEGIN
15 
16 
17 class DM_API IPointKernelExBase : public ObjectBase
18 {
19 public:
20  virtual ~IPointKernelExBase() {}
21 
22  ///returns a new instance of the current object (required for multi-threaded execusion)
23  virtual IPointKernelExBase* threadClone() const = 0;
24 
25  ///function is called, when the spatial index leaf changes
26  virtual void leafChanged(const IPointIndexLeaf &leaf) = 0;
27 
28  /// \brief processes a point
29  /// \param[in] point current point
30  /// \param[in] neighbors container object providing all neighbors of the current point depending on the specified spatial query object
31  /// \return true if the point was changed. otherwise false
32  virtual bool process(IPoint &point, const IContainer<IPoint> &neighbors) = 0;
33 
34 };
36 
37 
38 
39 class DM_API IPointKernelExWrapper : public ObjectBase
40 {
41 protected:
42  virtual ~IPointKernelExWrapper() {}
43 
44 public:
45  ///Access the base kernel object
46  virtual IPointKernelExBaseHandle getKernel() const = 0;
47 
48  virtual __int64 countOverall() const = 0; ///< overall point count (=Number of points in manager)
49  virtual __int64 countFiltered() const = 0; ///< number of points that where not processed because of the process filter
50  virtual __int64 countProcessed() const = 0; ///< number of points that where passed to the IPointKernelExBase::process function
51  virtual __int64 countChanged() const = 0; ///< number of points for which the IPointKernelExBase::process function returned true
52 
53 };
54 
55 DM_NAMESPACE_END
56 
57 #endif //DM_IPOINT_KERNEL_EX_HPP_INCLUDED