1 // Copyright David Abrahams 2002.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef ENUM_BASE_DWA200298_HPP
6 # define ENUM_BASE_DWA200298_HPP
7 
8 # include <boost/python/object_core.hpp>
9 # include <boost/python/type_id.hpp>
10 # include <boost/python/converter/to_python_function_type.hpp>
11 # include <boost/python/converter/convertible_function.hpp>
12 # include <boost/python/converter/constructor_function.hpp>
13 
14 namespace boost { namespace python { namespace objects {
15 
16 struct BOOST_PYTHON_DECL enum_base : python::api::object
17 {
18  protected:
19     enum_base(
20         char const* name
21         , converter::to_python_function_t
22         , converter::convertible_function
23         , converter::constructor_function
24         , type_info
25         , const char *doc = 0
26         );
27 
28     void add_value(char const* name, long value);
29     void export_values();
30 
31     static PyObject* to_python(PyTypeObject* type, long x);
32 };
33 
34 }}} // namespace boost::python::object
35 
36 #endif // ENUM_BASE_DWA200298_HPP
37