Debian Codegraph @

src/atlas/field/MultiFieldCreatorArray.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 Slavko Brdar
12 /// @date September 2024
13
14 #pragma once
15
16 #include "atlas/field/MultiFieldCreator.h"
17
18 namespace eckit {
19 class Configuration;
20 }
21 namespace atlas {
22 namespace field {
23 class MultiFieldImpl;
24 }
25 } // namespace atlas
26
27 namespace atlas {
28 namespace field {
29
30 // ------------------------------------------------------------------
31
32 /*!
33 * \brief MultiField creator using datatype, shape, variable names as arguments
34 * \details
35 * shape argument contains -1 at the position which gets filled with variable names
36 * Example use:
37 * \code{.cpp}
38 * MultiFieldImpl* multifield = MultiField::create(
39 * datatype,
40 * shape,
41 * var_names
42 * );
43 * \endcode
44 */
45 class MultiFieldCreatorArray : public MultiFieldCreator {
46 public:
47 MultiFieldCreatorArray();
48 MultiFieldCreatorArray(const eckit::Configuration& config);
49 ~MultiFieldCreatorArray() override;
50 MultiFieldImpl* create(const eckit::Configuration& config = util::Config()) const override;
51 MultiFieldImpl* create(const array::DataType datatype, const array::ArrayShape& shape,
52 const std::vector<std::string>& var_names) const override;
53 };
54
55 // ------------------------------------------------------------------
56
57 } // namespace field
58 } // namespace atlas