From fbd660af20e62c6d0836147b7eb83aafb4bad2e8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 4 Nov 2009 20:00:26 -0500 Subject: Removed several unneeded Python interface files --- src/py_scope.cc | 56 +++++++------------------------------------------------- 1 file changed, 7 insertions(+), 49 deletions(-) (limited to 'src/py_scope.cc') diff --git a/src/py_scope.cc b/src/py_scope.cc index cc85030c..c5c4fff6 100644 --- a/src/py_scope.cc +++ b/src/py_scope.cc @@ -38,59 +38,17 @@ namespace ledger { using namespace boost::python; namespace { - void py_scope_define(scope_t& scope, const string& name, expr_t& def) - { - return scope.define(name, def.get_op()); - } - - expr_t py_scope_lookup(scope_t& scope, const string& name) - { - return scope.lookup(name); - } - - value_t py_scope_getattr(scope_t& scope, const string& name) - { - return expr_t(scope.lookup(name)).calc(scope); - } - - struct scope_wrapper : public scope_t - { - PyObject * self; - - scope_wrapper(PyObject * self_) : self(self_) {} - - virtual expr_t::ptr_op_t lookup(const string&) { - return NULL; - } - }; } void export_scope() { - class_< scope_t, scope_wrapper, boost::noncopyable > ("Scope", no_init) - .def("define", py_scope_define) - .def("lookup", py_scope_lookup) - .def("__getattr__", py_scope_getattr) - ; - - class_< child_scope_t, bases, - boost::noncopyable > ("ChildScope") - .def(init<>()) - .def(init()) - ; - - class_< symbol_scope_t, bases, - boost::noncopyable > ("SymbolScope") - .def(init<>()) - .def(init()) - ; - - class_< call_scope_t, bases, - boost::noncopyable > ("CallScope", init()) - ; - - class_< bind_scope_t, bases, - boost::noncopyable > ("BindScope", init()) + class_< scope_t, boost::noncopyable > ("Scope", no_init) +#if 0 + .def("is_posting", ) + .def("is_transaction", ) + .def("is_account", ) + .def("is_journal", ) +#endif ; } -- cgit v1.2.3