ModuleDeleter.hpp
1 #pragma once
2 
3 #include "opals/IModuleBase.hpp"
4 
5 namespace opals
6 {
7  /**
8  \struct ModuleDeleter
9  \brief A functor that may be used for memory management of modules allocated on the heap
10  usage: e.g. std::shared_ptr<IGrid> grid( opals::IGrid::New(), opals::ModuleDeleter() );
11 
12  \author wk
13  \date 20.12.2011
14  */
16  {
17  void operator()(opals::IModuleBase *ptr) const
18  {
19  if(ptr)
20  ptr->Delete();
21  ptr = 0;
22  }
23  };
24 }
Definition: metaShape2stripAdjust.py:29
np.ndarray projected(Sensor sensor, np.ndarray camPt)
Definition: metaShape2stripAdjust.py:406
A functor that may be used for memory management of modules allocated on the heap usage: e....
Definition: ModuleDeleter.hpp:15
virtual void Delete()=0
Destroy modules allocated on the heap.
def metaShape2stripAdjust(Path project, typing.Union[int, None] chunk, typing.Union[float, None] maxReprojectionError, int minMultiplicity, int warnIfLessImagePointsThan, Path outDir)
Definition: metaShape2stripAdjust.py:435
Contains the public interface of OPALS.
Definition: AbsValueOrQuantile.hpp:8
Abstract base class of all opals modules.
Definition: IModuleBase.hpp:13
Definition: metaShape2stripAdjust.py:37