Last change
on this file since 2370 was
2270,
checked in by ymipsl, 3 years ago
|
Tracking memory leak :
Tranformations and algorithms are now managed with shared_ptr.
YM
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2007] | 1 | #ifndef __XIOS_GRID_ALGORITHM_HPP__ |
---|
| 2 | #define __XIOS_GRID_ALGORITHM_HPP__ |
---|
[1999] | 3 | |
---|
| 4 | #include "grid_transform_connector.hpp" |
---|
| 5 | #include <map> |
---|
| 6 | #include "array_new.hpp" |
---|
| 7 | #include "local_view.hpp" |
---|
| 8 | |
---|
| 9 | namespace xios |
---|
| 10 | { |
---|
| 11 | class CGrid; |
---|
| 12 | class CGenericAlgorithmTransformation ; |
---|
| 13 | |
---|
| 14 | /*! |
---|
| 15 | \class CGenericAlgorithmTransformation |
---|
| 16 | This class defines the interface for all other inherited algorithms class |
---|
| 17 | */ |
---|
[2007] | 18 | class CTransformFilter ; |
---|
| 19 | class CGarbageCollector ; |
---|
| 20 | |
---|
[2270] | 21 | class CGridAlgorithm : public std::enable_shared_from_this<CGridAlgorithm> |
---|
[1999] | 22 | { |
---|
| 23 | public: |
---|
[2270] | 24 | CGridAlgorithm(shared_ptr<CGenericAlgorithmTransformation> algorithm) : algorithm_(algorithm) {} ; |
---|
[2007] | 25 | virtual ~CGridAlgorithm() {} ; |
---|
[2011] | 26 | virtual void apply(const CArray<double,1>& dataIn, CArray<double,1>& dataOut) { abort(); } //=0 |
---|
| 27 | virtual void apply(const CArray<double,1>& dataIn, const vector<CArray<double,1>>& auxData, CArray<double,1>& dataOut) { abort(); } //=0 |
---|
[2007] | 28 | virtual CTransformFilter* createTransformFilter(CGarbageCollector& gc, bool detectMissingValues, double defaultValue) ; |
---|
[2016] | 29 | virtual bool isGenerateTranformation(void) ; |
---|
[2145] | 30 | virtual StdString getAlgoName() ; |
---|
[2007] | 31 | |
---|
| 32 | protected: |
---|
[2270] | 33 | shared_ptr<CGenericAlgorithmTransformation> algorithm_=nullptr ; |
---|
[1999] | 34 | }; |
---|
| 35 | |
---|
| 36 | } |
---|
| 37 | #endif // __XIOS_GRID_ALGORITHM_TRANSFORMATION_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.