IODA Bundle
ODAHandle.cc
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 #include "eckit/types/Types.h"
12 #include "odc/ODAHandle.h"
13 
14 using namespace eckit;
15 
16 namespace odc {
17 
18 
19 
20 ODAHandle::ODAHandle(Offset start, Offset end)
21 : start_(start),
22  end_(end)
23 {
24  Log::debug() << "ODAHandle::ODAHandle(" << start << ", " << end << ")" << std::endl;
25 }
26 
27 void ODAHandle::print(std::ostream& o) const
28 {
29  o << "[start:" << start_<< ", end_:" << end_ << ", values_:" /*<< values_ <<*/ "]";
30 }
31 
32 ODAHandle::~ODAHandle()
33 {
34  Log::debug() << "ODAHandle::~ODAHandle()" << std::endl;
35 }
36 
37 void ODAHandle::addValue(const std::string& columnName, double v)
38 {
39  Log::debug() << "ODAHandle::addValue('" << columnName << "', '" << v << "')" << std::endl;
40  ASSERT(values_.find(columnName) == values_.end());
41  values_[columnName] = v;
42 }
43 
44 }
Definition: ColumnInfo.h:23