TableSchema.hpp
Go to the documentation of this file.
1/*
2 Copyright 2015 Statoil ASA.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
21#ifndef OPM_TABLE_SCHEMA_HPP
22#define OPM_TABLE_SCHEMA_HPP
23
24#include <string>
25
28
29namespace Opm {
30
32 public:
34
36 const ColumnSchema& getColumn( const std::string& name ) const;
37 const ColumnSchema& getColumn( size_t columnIndex ) const;
38 bool hasColumn(const std::string&) const;
39
40 /* Number of columns */
41 size_t size() const;
42
43 bool operator==(const TableSchema& data) const;
44
45 template<class Serializer>
46 void serializeOp(Serializer& serializer)
47 {
48 m_columns.serializeOp(serializer);
49 }
50
51 private:
53 };
54}
55
56#endif
57
const char *const name
Definition: cJSON.h:258
const char *const string
Definition: cJSON.h:170
Definition: ColumnSchema.hpp:31
Definition: OrderedMap.hpp:32
Definition: Serializer.hpp:38
Definition: TableSchema.hpp:31
bool operator==(const TableSchema &data) const
static TableSchema serializeObject()
size_t size() const
void serializeOp(Serializer &serializer)
Definition: TableSchema.hpp:46
const ColumnSchema & getColumn(const std::string &name) const
const ColumnSchema & getColumn(size_t columnIndex) const
bool hasColumn(const std::string &) const
void addColumn(ColumnSchema)
Definition: A.hpp:4
static std::string data()
Definition: exprtk.hpp:40022