#ifndef __XIOS_GRID_ALGORITHM_GENERIC_HPP__ #define __XIOS_GRID_ALGORITHM_GENERIC_HPP__ #include "grid_transform_connector.hpp" #include #include "array_new.hpp" #include "local_view.hpp" #include "grid_algorithm.hpp" namespace xios { class CGrid; class CGenericAlgorithmTransformation ; /*! \class CGenericAlgorithmTransformation This class defines the interface for all other inherited algorithms class */ class CTransformFilter ; class CGarbageCollector ; class CGridAlgorithmGeneric : public CGridAlgorithm { public: CGridAlgorithmGeneric(CGrid* gridSrc, CGrid* gridDst, int pos, shared_ptr algo) ; virtual ~CGridAlgorithmGeneric() {} ; void computeAlgorithm(bool eliminateRedundant=true) ; virtual void apply(const CArray& dataIn, CArray& dataOut) ; virtual void apply(const CArray& dataIn, const vector>& auxData, CArray& dataOut) ; protected: shared_ptr gridTransformConnector_=nullptr ; CGrid* gridSrc_ = nullptr ; CGrid* gridDst_ = nullptr ; int pos_ ; int dimBefore_=1 ; int dimAfter_=1 ; }; } #endif // __XIOS_GRID_ALGORITHM_GENERIC_HPP__