| 1 |
/* |
| 2 |
* (C) Copyright 2013 ECMWF. |
| 3 |
* |
| 4 |
* This software is licensed under the terms of the Apache Licence Version 2.0 |
| 5 |
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 6 |
* In applying this licence, ECMWF does not waive the privileges and immunities |
| 7 |
* granted to it by virtue of its status as an intergovernmental organisation |
| 8 |
* nor does it submit to any jurisdiction. |
| 9 |
*/ |
| 10 |
|
| 11 |
#pragma once |
| 12 |
|
| 13 |
#include "atlas/grid/Grid.h" |
| 14 |
#include "atlas/trans/LegendreCacheCreator.h" |
| 15 |
#include "atlas/util/Config.h" |
| 16 |
|
| 17 |
//----------------------------------------------------------------------------- |
| 18 |
|
| 19 |
namespace atlas { |
| 20 |
namespace trans { |
| 21 |
|
| 22 |
//----------------------------------------------------------------------------- |
| 23 |
|
| 24 |
class LegendreCacheCreatorLocal : public trans::LegendreCacheCreatorImpl { |
| 25 |
public: |
| 26 |
LegendreCacheCreatorLocal(const Grid&, int truncation, const eckit::Configuration& = util::NoConfig()); |
| 27 |
|
| 28 |
virtual ~LegendreCacheCreatorLocal() override; |
| 29 |
|
| 30 |
virtual bool supported() const override; |
| 31 |
|
| 32 |
virtual std::string uid() const override; |
| 33 |
|
| 34 |
virtual void create(const std::string& path) const override; |
| 35 |
|
| 36 |
virtual Cache create() const override; |
| 37 |
|
| 38 |
size_t estimate() const override; |
| 39 |
|
| 40 |
private: |
| 41 |
const Grid grid_; |
| 42 |
const int truncation_; |
| 43 |
const util::Config config_; |
| 44 |
mutable std::string unique_identifier_; |
| 45 |
}; |
| 46 |
|
| 47 |
// ------------------------------------------------------------------ |
| 48 |
|
| 49 |
} // namespace trans |
| 50 |
} // namespace atlas |