Orcus
Loading...
Searching...
No Matches
tables.hpp
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 */
7
8#include "../env.hpp"
9#include "types.hpp"
10
11#include <memory>
12#include <string_view>
13#include <map>
14
15namespace ixion {
16
17class model_context;
18
19}
20
21namespace orcus {
22
23class string_pool;
24
25namespace spreadsheet {
26
27namespace detail { struct document_impl; }
28
29struct table_t;
30
31class ORCUS_SPM_DLLPUBLIC tables
32{
33 friend struct detail::document_impl;
34
35 tables(string_pool& sp, ixion::model_context& context);
36
37public:
38 tables() = delete;
39 tables(const tables&) = delete;
40 ~tables();
41
42 tables& operator=(const tables&) = delete;
43
49 void insert(std::unique_ptr<table_t> p);
50
60 std::weak_ptr<const table_t> get(std::string_view name) const;
61
70 std::map<std::string_view, std::weak_ptr<const table_t>> get_by_sheet(sheet_t pos) const;
71
72private:
73 struct impl;
74 std::unique_ptr<impl> mp_impl;
75};
76
77}}
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::weak_ptr< const table_t > get(std::string_view name) const
void insert(std::unique_ptr< table_t > p)
std::map< std::string_view, std::weak_ptr< const table_t > > get_by_sheet(sheet_t pos) const
Definition string_pool.hpp:26
Definition table.hpp:63