atlas
Type.h
1 /*
2  * (C) Copyright 2020 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 <string>
14 
15 namespace atlas {
16 namespace io {
17 
18 struct Type {
19  const std::string name_;
20  operator const std::string&() { return name_; }
21  operator bool() const { return name_.size(); }
22  Type( const char* name ) : name_( name ) {}
23  Type( const std::string& name ) : name_( name ) {}
24  bool operator==( const Type& other ) const { return name_ == other.name_; }
25 };
26 
27 
28 } // namespace io
29 } // namespace atlas
Definition: Type.h:18
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33