summaryrefslogtreecommitdiffstats
path: root/include/ixion/interface/table_handler.hpp
blob: 0971d2ebe81547c0aa127d9583d4f574b3a8cf6b (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
56
57
58
59
60
61
62
63
/* -*- 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/.
 */

#ifndef IXION_INTERFACE_TABLE_HANDLER_HPP
#define IXION_INTERFACE_TABLE_HANDLER_HPP

#include "../types.hpp"

namespace ixion {

struct abs_address_t;
struct abs_range_t;

namespace iface {

class IXION_DLLPUBLIC table_handler
{
public:
    virtual ~table_handler();

    /**
     * Get the data range associated with a given column name.  The current
     * position is used to infer which table to use.
     *
     * @param pos current cell position.
     * @param column_first name of the starting column within the table.
     * @param column_last name of the ending column within the table, or
     *                    empty_string_id if it's a single column.
     * @param areas area specifiter value, which may consist of one or more
     *              values of table_area_t.
     *
     * @return referenced data range.
     */
    virtual abs_range_t get_range(
        const abs_address_t& pos, string_id_t column_first, string_id_t column_last,
        table_areas_t areas) const = 0;

    /**
     * Get the data range associated with given table and column names.
     *
     * @param table string identifier representing the table name.
     * @param column_first name of the starting column within the table.
     * @param column_last name of the ending column within the table, or
     *                    empty_string_id if it's a single column.
     * @param areas area specifiter value, which may consist of one or more
     *              values of table_area_t.
     *
     * @return referenced data range.
     */
    virtual abs_range_t get_range(
        string_id_t table, string_id_t column_first, string_id_t column_last,
        table_areas_t areas) const = 0;
};

}}

#endif

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