Debian Codegraph @

src/atlas/domain/detail/GlobalDomain.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 #pragma once
12
13 #include "atlas/domain/detail/ZonalBandDomain.h"
14
15 namespace atlas {
16 namespace domain {
17
18 class GlobalDomain : public ZonalBandDomain {
19 public:
20 GlobalDomain();
21 GlobalDomain(const double west);
22 GlobalDomain(const eckit::Parametrisation& p);
23
24 static std::string static_type() { return "global"; }
25 virtual std::string type() const override { return static_type(); }
26
27 /// Checks if the point is contained in the domain
28 virtual bool contains(double x, double y) const override { return true; }
29
30 // Domain properties
31 virtual bool global() const override { return true; }
32 virtual bool empty() const override { return false; }
33
34 virtual Spec spec() const override;
35
36 virtual void print(std::ostream&) const override;
37
38 virtual void hash(eckit::Hash&) const override;
39
40 /// Check if grid includes the North pole
41 virtual bool containsNorthPole() const override { return true; }
42
43 /// Check if grid includes the South pole
44 virtual bool containsSouthPole() const override { return true; }
45
46 private:
47 friend class ::atlas::RectangularDomain;
48 };
49
50 } // namespace domain
51 } // namespace atlas