Debian Codegraph @

src/atlas/field/FieldCreatorArraySpec.h

raw
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 /// @author Willem Deconinck
12 /// @date June 2015
13
14 #pragma once
15
16 #include "atlas/field/FieldCreator.h"
17
18 namespace eckit {
19 class Parametrisation;
20 }
21 namespace atlas {
22 namespace field {
23 class Field;
24 }
25 } // namespace atlas
26
27 namespace atlas {
28 namespace field {
29
30 // ------------------------------------------------------------------
31
32 /*!
33 * \brief Field creator using array::ArrayShape parametrisation
34 * \details
35 * \code{.cpp}
36 * FieldImpl* field = Field::create(
37 * Config
38 * ("creator","ArraySpec") // ArraySpec FieldCreator
39 * ("shape",array::make_shape(100,3)) // Rank 2 field with indexing [100][3]
40 * ("datatype",array::DataType::real64()) // Field internal data type
41 * );
42 * \endcode
43 */
44 class FieldCreatorArraySpec : public FieldCreator {
45 public:
46 FieldCreatorArraySpec() {}
47 FieldCreatorArraySpec(const eckit::Parametrisation&) {}
48 virtual FieldImpl* createField(const eckit::Parametrisation&) const;
49 };
50
51 // ------------------------------------------------------------------
52
53 } // namespace field
54 } // namespace atlas