IODA Bundle
MDSetter.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2012 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 nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef MDSetter_H
12 #define MDSetter_H
13 
14 namespace odc {
15 
16 template <typename T>
17 class MDSetter
18 {
19 public:
22 
23  MDSetter(const T& b, const T& e, const std::vector<std::string>& columns, const std::vector<std::string>& types)
24  : ii_(b), end_(e), columns_(columns), types_(types)
25  {}
26 
27  ~MDSetter() {}
28 
30  const iterator end() { return iterator(new iterator_class(end_)); }
31 
32 private:
33  T ii_;
34  const T& end_;
35  const std::vector<std::string> columns_;
36  const std::vector<std::string> types_;
37 };
38 
39 } // namespace odc
40 
41 #include "odc/MDSetter.cc"
42 
43 #endif
44 
iterator begin()
Definition: MDSetter.h:29
const T & end_
Definition: MDSetter.h:34
const std::vector< std::string > types_
Definition: MDSetter.h:36
odc::IteratorProxy< iterator_class, MDSetter, const double > iterator
Definition: MDSetter.h:21
const std::vector< std::string > columns_
Definition: MDSetter.h:35
odc::MDUpdatingIterator< T > iterator_class
Definition: MDSetter.h:20
MDSetter(const T &b, const T &e, const std::vector< std::string > &columns, const std::vector< std::string > &types)
Definition: MDSetter.h:23
const iterator end()
Definition: MDSetter.h:30
Definition: ColumnInfo.h:23