#!C:/Python26/python.exe

import os

from pyplusplus import module_builder

simtk_dir = 'C:/Program Files/SimTK/core';

# Permit functions with up to 30 arguments
# DEFINES = [ "BOOST_PYTHON_MAX_ARITY=30" ]
# pyplusplus.decl_wrappers.calldef_wrapper.calldef_t()

mb = module_builder.module_builder_t(
        files=['C:/Program Files/SimTK/core/include/SimTKsimbody.h'], 
        gccxml_path='C:/Program Files/gccxml 0.9/bin/gccxml.exe', 
        include_paths=['C:/Program Files/SimTK/core/include']
        )

# Exclude all classes
mb.classes().exclude()
mb.free_functions().exclude()
mb.variables().exclude()
ns_simtk = mb.namespace('SimTK')
ns_simtk.exclude()
mb.enumerations().exclude()
# ns_none = mb.namespace()
# ns_none.exclude()

# Only export certain classes
system = mb.class_('System')
# system.include()
mbs = mb.class_('MultibodySystem')
# mbs.include()

mb.print_declarations()

mb.build_code_creator( module_name='simtk' )

# Don't want absolute includes within code
mb.code_creator.user_defined_directories.append( os.path.abspath('.') )
mb.code_creator.user_defined_directories.append( os.path.abspath('C:/Program Files/SimTK/core/include') )

mb.split_module( os.path.join(os.path.abspath('.'), 'wrap_simtk'))

print "foo"

