MI - Fimex
CDMDimension.h
Go to the documentation of this file.
1 /*
2  * Fimex
3  *
4  * (C) Copyright 2008, met.no
5  *
6  * Project Info: https://wiki.met.no/fimex/start
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21  * USA.
22  */
23 
24 #ifndef CDMDIMENSION_H_
25 #define CDMDIMENSION_H_
26 
27 #include <string>
28 #include <ostream>
29 #include "fimex/CDMNamedEntity.h"
30 
31 namespace MetNoFimex
32 {
33 
38 {
39 public:
40  CDMDimension(); // default null constructor for maps
41  CDMDimension(std::string name, long length);
42  virtual ~CDMDimension();
43  const std::string& getName() const {return name;}
44  void setName(std::string newName) {name = newName;}
45  size_t getLength() const {return length;}
46  void setLength(size_t length) {this->length = length;}
47  void setUnlimited(int unlimited) {this->unlimited = unlimited;}
48  int isUnlimited() const {return unlimited;}
54  void toXMLStream(std::ostream& out) const;
55 private:
56  std::string name;
57  size_t length;
58  int unlimited;
59 
60 };
61 
62 }
63 
64 #endif /*CDMDIMENSION_H_*/
void setName(std::string newName)
Definition: CDMDimension.h:44
Definition: CDMNamedEntity.h:42
basic_string< char > string
size_t getLength() const
Definition: CDMDimension.h:45
int isUnlimited() const
Definition: CDMDimension.h:48
void setLength(size_t length)
Definition: CDMDimension.h:46
basic_ostream< char > ostream
Definition: C_CDMReader.h:35
Definition: CDMDimension.h:37
void setUnlimited(int unlimited)
Definition: CDMDimension.h:47
const std::string & getName() const
Definition: CDMDimension.h:43
void toXMLStream(std::ostream &out) const
print xml representation to stream