from pyplusplus import module_builder
from pyplusplus.module_builder.call_policies import *
from pygccxml import declarations

mb = module_builder.module_builder_t(files = ['wrap_external.hpp']
       , gccxml_path='C:/Program Files/gccxml_sherm/bin/gccxml.exe'
       , include_paths=["C:/Program Files/boost/boost_1_42"]
       , define_symbols=["_HAS_TR1=0"])
       
foo = mb.class_('foo')
foo.include_files.append('boost_adaptbx/python_streambuf.h')
foo.add_declaration_code("""
    using boost_adaptbx::python::streambuf;
    void foo_say_hello_wrapper(const foo& f, const streambuf& output)
    {
        streambuf::ostream os(const_cast<streambuf&>(output));
        f.say_hello(os);
    }
""")

mb.build_code_creator(module_name='_external')
mb.split_module('generated_code')

