| 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/Domain.h" |
| 14 |
|
| 15 |
namespace atlas { |
| 16 |
namespace domain { |
| 17 |
|
| 18 |
class EmptyDomain : public Domain { |
| 19 |
public: |
| 20 |
EmptyDomain(); |
| 21 |
EmptyDomain(const eckit::Parametrisation& p); |
| 22 |
|
| 23 |
/// Checks if the point is contained in the domain |
| 24 |
virtual bool contains(double x, double y) const override { return false; } |
| 25 |
|
| 26 |
static std::string static_type() { return "empty"; } |
| 27 |
virtual std::string type() const override { return static_type(); } |
| 28 |
|
| 29 |
virtual bool empty() const override { return true; } |
| 30 |
virtual bool global() const override { return false; } |
| 31 |
|
| 32 |
virtual Spec spec() const override; |
| 33 |
|
| 34 |
virtual void print(std::ostream&) const override; |
| 35 |
|
| 36 |
virtual std::string units() const override; // Not implemented |
| 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 false; } |
| 42 |
|
| 43 |
/// Check if grid includes the South pole |
| 44 |
virtual bool containsSouthPole() const override { return false; } |
| 45 |
}; |
| 46 |
|
| 47 |
} // namespace domain |
| 48 |
} // namespace atlas |