World Builder  1.1.0-pre
A geodynamic initial conditions generator
value_at_points.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018-2024 by the authors of the World Builder code.
3 
4  This file is part of the World Builder.
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef WORLD_BUILDER_TYPES_VALUE_AT_POINTS_H
21 #define WORLD_BUILDER_TYPES_VALUE_AT_POINTS_H
22 
24 #include <vector>
25 
26 
27 namespace WorldBuilder
28 {
29  class Parameters;
30 
31  namespace Types
32  {
36  class ValueAtPoints : public Interface
37  {
38  public:
42  ValueAtPoints(const double default_value,
43  uint64_t max_values_in_array,
44  std::vector<Point<2>> default_points_ = std::vector<Point<2>>());
45 
49  ValueAtPoints(ValueAtPoints const &other);
50 
51 
55  ~ValueAtPoints() override;
56 
60  void write_schema(Parameters &prm,
61  const std::string &name,
62  const std::string &documentation) const override final;
63 
64  double default_value;
66  std::vector<Point<2> > default_points;
67 
68  protected:
69  ValueAtPoints *clone_impl() const override final
70  {
71  return new ValueAtPoints(*this);
72  };
73  private:
74 
75  };
76  } // namespace Types
77 
78 } // namespace WorldBuilder
79 
80 #endif
ValueAtPoints * clone_impl() const override final
void write_schema(Parameters &prm, const std::string &name, const std::string &documentation) const override final
ValueAtPoints(const double default_value, uint64_t max_values_in_array, std::vector< Point< 2 >> default_points_=std::vector< Point< 2 >>())
std::vector< Point< 2 > > default_points