| 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 |
#include <ostream> |
| 12 |
|
| 13 |
#include "eckit/utils/Hash.h" |
| 14 |
|
| 15 |
#include "atlas/domain/detail/DomainFactory.h" |
| 16 |
#include "atlas/domain/detail/EmptyDomain.h" |
| 17 |
#include "atlas/runtime/Exception.h" |
| 18 |
|
| 19 |
namespace atlas { |
| 20 |
namespace domain { |
| 21 |
|
| 22 |
EmptyDomain::EmptyDomain() = default; |
| 23 |
|
| 24 |
EmptyDomain::EmptyDomain(const eckit::Parametrisation& p) {} |
| 25 |
|
| 26 |
EmptyDomain::Spec EmptyDomain::spec() const { |
| 27 |
Spec domain_spec; |
| 28 |
domain_spec.set("type", type()); |
| 29 |
return domain_spec; |
| 30 |
} |
| 31 |
|
| 32 |
void EmptyDomain::print(std::ostream& os) const { |
| 33 |
os << "EmptyDomain"; |
| 34 |
} |
| 35 |
|
| 36 |
void EmptyDomain::hash(eckit::Hash& h) const { |
| 37 |
h.add(type()); |
| 38 |
} |
| 39 |
|
| 40 |
std::string EmptyDomain::units() const { |
| 41 |
ATLAS_NOTIMPLEMENTED; |
| 42 |
} |
| 43 |
|
| 44 |
namespace { |
| 45 |
static DomainBuilder<EmptyDomain> register_builder(EmptyDomain::static_type()); |
| 46 |
} |
| 47 |
|
| 48 |
} // namespace domain |
| 49 |
} // namespace atlas |