summaryrefslogtreecommitdiffstats
path: root/src/python/global.cpp
blob: 4d9a76b29a30c7ec4f757797e099e559d4ed9dfa (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
/* -*- 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/config.hpp"
#include "global.hpp"

namespace ixion { namespace python {

document_global::document_global() :
    m_cxt(),
    m_resolver(ixion::formula_name_resolver::get(formula_name_resolver_t::excel_a1, &m_cxt))
{
}

PyObject* get_python_document_error()
{
    static PyObject* p = PyErr_NewException(const_cast<char*>("ixion.DocumentError"), NULL, NULL);
    return p;
}

PyObject* get_python_sheet_error()
{
    static PyObject* p = PyErr_NewException(const_cast<char*>("ixion.SheetError"), NULL, NULL);
    return p;
}

PyObject* get_python_formula_error()
{
    static PyObject* p = PyErr_NewException(const_cast<char*>("ixion.FormulaError"), NULL, NULL);
    return p;
}

}}

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