ScummVM API documentation
table.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Copyright 2020 Google
21  *
22  */
23 #ifndef HADESCH_TABLE_H
24 #define HADESCH_TABLE_H
25 
26 #include "common/array.h"
27 #include "common/stream.h"
28 #include "common/str.h"
29 #include "common/hash-str.h"
30 
31 namespace Hadesch {
32 class TableLine {
33 public:
35  TableLine();
36  bool isValid() const;
37  Common::String operator[](int idx) const;
38 private:
39  bool _valid;
41 };
42 
43 class TextTable {
44 public:
46  TextTable();
47  Common::String get(int row, int col) const;
48  Common::String get(const Common::String &row, int col, int rowidx = 0) const;
49  Common::String get(const Common::String &row, const Common::String &col, int rowidx = 0) const;
50  Common::String get(int row, const Common::String &col) const;
51  int size() const;
52  int rowCount(const Common::String &row) const;
53 private:
54  TableLine _header;
58 };
59 }
60 #endif
Definition: table.h:32
Definition: str.h:59
Definition: ambient.h:30
Definition: table.h:43