IODA Bundle
ConstantSetter.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 ConstantSetter_H
12 #define ConstantSetter_H
13 
14 #include "odc/IteratorProxy.h"
16 
17 namespace odc {
18 
19 template <typename T>
21 {
22 public:
25 
26  ConstantSetter(const T& b, const T& e, const std::vector<std::string>& columns, const std::vector<double>& values)
27  : ii_(b), end_(e), columns_(columns), values_(values)
28  {}
29 
31 
33  const iterator end() { return iterator(new iterator_class(end_)); }
34 
35 private:
36  T ii_;
37  const T& end_;
38  const std::vector<std::string> columns_;
39  const std::vector<double> values_;
40 };
41 
42 } // namespace odc
43 
44 #include "odc/ConstantSetter.cc"
45 
46 #endif
47 
ConstantSetter(const T &b, const T &e, const std::vector< std::string > &columns, const std::vector< double > &values)
odc::ODAUpdatingIterator< T > iterator_class
odc::IteratorProxy< iterator_class, ConstantSetter, const double > iterator
const iterator end()
const std::vector< std::string > columns_
const std::vector< double > values_
Definition: ColumnInfo.h:23