summaryrefslogtreecommitdiffstats
path: root/src/libixion/workbook.cpp
blob: 7fd73281593637dc17a53316d6c15fbaac07c8d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "ixion/global.hpp"

#include "workbook.hpp"

namespace ixion {

worksheet::worksheet() {}

worksheet::worksheet(size_t row_size, size_t col_size)
{
    m_pos_hints.reserve(col_size);
    for (size_t i = 0; i < col_size; ++i)
    {
        m_columns.emplace_back(row_size);
        m_pos_hints.push_back(m_columns.back().begin());
    }
}

worksheet::~worksheet() {}

workbook::workbook() {}

workbook::workbook(size_t sheet_size, size_t row_size, size_t col_size)
{
    for (size_t i = 0; i < sheet_size; ++i)
        m_sheets.emplace_back(row_size, col_size);
}

workbook::~workbook() {}

void workbook::push_back(size_t row_size, size_t col_size)
{
    m_sheets.emplace_back(row_size, col_size);
}

size_t workbook::size() const
{
    return m_sheets.size();
}

bool workbook::empty() const
{
    return m_sheets.empty();
}

}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */