MI - Fimex
TimeSpec.h
Go to the documentation of this file.
1 /*
2  * Fimex, TimeSpec.h
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  * Created on: Dec 11, 2008
24  * Author: Heiko Klein
25  */
26 
27 #ifndef TIMESPEC_H_
28 #define TIMESPEC_H_
29 
30 #include "fimex/TimeUnit.h"
31 #include "fimex/CDMException.h"
32 #include <vector>
33 #include <string>
34 
35 namespace MetNoFimex
36 {
37 
77 class TimeSpec
78 {
79 public:
86  TimeSpec(const std::string& timeSpec, const FimexTime& startTime, const FimexTime& endTime) throw(CDMException);
87  virtual ~TimeSpec() {};
88  const std::vector<FimexTime>& getTimeSteps() const {return timeSteps;}
89  const std::string& getUnitString() const {return outputUnit;}
90 
91 private:
92  std::string outputUnit;
93  std::vector<FimexTime> timeSteps;
94 };
95 
96 } /* MetNoFimex */
97 
98 #endif /* TIMESPEC_H_ */
basic_string< char > string
const std::vector< FimexTime > & getTimeSteps() const
Definition: TimeSpec.h:88
const std::string & getUnitString() const
Definition: TimeSpec.h:89
TimeSpec(const std::string &timeSpec, const FimexTime &startTime, const FimexTime &endTime)
Definition: CDMException.h:36
STL class.
Definition: TimeSpec.h:77
Definition: C_CDMReader.h:35
virtual ~TimeSpec()
Definition: TimeSpec.h:87
Definition: TimeUnit.h:45