import os
from xdress.utils import apiname

package = 'cppproj'
packagedir = 'cppproj'
includes = ['src']

plugins = ('xdress.autoall', 'xdress.pep8names', 'xdress.cythongen', 
           'xdress.stlwrap', )

extra_types = 'cppproj_extra_types'  # non-default value

dtypes = [
    ('map', 'str', 'int'),
    ('set', 'int'),
    'float32',
    ('vector', 'int32'),
    'ThreeNums',
    ]

stlcontainers = [
    ('pair', 'int', ('vector', 'int')),
    ('pair', 'int', 'str'),
    ('pair', 'int', 'int'),
    ('pair', 'int', 'SomeCrazyPairValue'),
    ('pair', 'ThreeNums', 'int'),
    ('vector', 'float64'),
    ('vector', 'str'),
    ('vector', 'int32'),
    ('vector', 'complex'),
    ('vector', ('vector', 'float64')),
    ('set', 'int'),
    ('set', 'str'),
    ('set', 'uint'),
    ('set', 'char'),
    ('set', 'ThreeNums'),
    ('map', 'str', 'str'),
    ('map', 'str', 'int'),
    ('map', 'int', 'str'),
    ('map', 'str', 'uint'),
    ('map', 'uint', 'str'),
    ('map', 'uint', 'uint'),
    ('map', 'str', 'float'),
    ('map', 'ThreeNums', 'float'),
    ('map', 'int', 'int'),
    ('map', 'int', 'bool'),
    ('map', 'int', 'char'),
    ('map', 'int', 'float'),
    ('map', 'uint', 'float'),
    ('map', 'int', 'complex'),
    ('map', ('pair', 'int', 'int'), 'float'),
    ('map', 'int', ('set', 'int')),
    ('map', 'int', ('set', 'str')),
    ('map', 'int', ('set', 'uint')),
    ('map', 'int', ('set', 'char')),
    ('map', 'int', ('vector', 'str')),
    ('map', 'int', ('vector', 'int')),
    ('map', 'int', ('vector', 'uint')),
    ('map', 'int', ('vector', 'char')),
    ('map', 'int', ('vector', 'bool')),
    ('map', 'int', ('vector', 'float')),
    ('map', 'int', ('vector', ('vector', 'float64'))),
    ('map', 'int', ('map', 'int', 'bool')),
    ('map', 'int', ('map', 'int', 'char')),
    ('map', 'int', ('map', 'int', 'float')),
    ('map', 'int', ('map', 'int', ('vector', 'bool'))),
    ('map', 'int', ('map', 'int', ('vector', 'char'))),
    ('map', 'int', ('map', 'int', ('vector', 'float'))),
    ('map', 'int', ('vector', ('set', 'int'))),
    ]

dtypes_module = 'dt'
stlcontainers_module = 'stlc'

_fromsrcdir = lambda x: os.path.join('src', x)
_inbasics = {'srcfiles': _fromsrcdir('basics.[ch]*'),
             'incfiles': 'basics.hpp',  # trick to get around cython generating *.h
             'language': 'c++',
             }
_indiscovery = {'srcfiles': _fromsrcdir('discovery*'),
                'incfiles': 'discovery.h',
                'language': 'c++',
                }

variables = [
    apiname('PersonID', tarbase='pybasics', **_inbasics),
    apiname('*', **_indiscovery),
    ]

functions = [
    apiname('voided', **_inbasics),
    apiname('pairs_be_crazy', tarbase='pybasics', **_inbasics),
    apiname('call_with_void_fp_struct', **_inbasics), 
    {'srcname': 'func0', 
     'tarname': 'a_better_name',
     'incfiles': 'basics.h',
     'srcfiles': _fromsrcdir('basics.[ch]*')},
    apiname('func1', **_inbasics),
    apiname('func2', **_inbasics),
    apiname('func3', **_inbasics),
    apiname('func4', tarbase='pybasics', **_inbasics),
    apiname('setfunc', **_inbasics),
    apiname(('findmin', 'int32', 'float32',), **_inbasics), 
    apiname(('findmin', 'float64', 'float32',), **_inbasics), 
    {'srcname': ('findmin', 'int', 'int',), 
     'incfiles': 'basics.h',
     'tarname': ('regmin', 'int', 'int',), 
     'srcfiles': _fromsrcdir('basics.[ch]*')}, 
    {'srcname': ('findmin', 'bool', 'bool',), 
     'tarname': 'sillyBoolMin', 
     'incfiles': 'basics.h',
     'srcfiles': _fromsrcdir('basics.[ch]*')}, 
    apiname(('lessthan', 'int32', 3,), **_inbasics),
    apiname('call_threenums_op_from_c', tarbase='pybasics', **_inbasics),
    apiname('*', **_indiscovery),
    ]

classes = [
    #apiname('struct0', 'basics', 'pybasics', 'My_Struct_0'),  FIXME This needs more work
    apiname('Union0', **_inbasics),
    apiname('VoidFPStruct', **_inbasics),
    apiname('A', **_inbasics),
    apiname('B', **_inbasics),
    apiname('C', **_inbasics),
    apiname('SomeCrazyPairValue', tarbase='pybasics', **_inbasics),
    # apiname('SomeCrazyPairValue', **_inbasics),
    apiname(('TClass1', 'int32'), **_inbasics), 
    apiname(('TClass1', 'float64'), **_inbasics), 
    {'srcname': ('TClass1', 'float32'), 
     'tarname': 'TC1Floater', 
     'incfiles': 'basics.h',
     'srcfiles': _fromsrcdir('basics.[ch]*')}, 
    apiname(('TClass0', 'int32'), **_inbasics), 
    apiname(('TClass0', 'float64'), **_inbasics), 
    {'srcname': ('TClass0', 'bool'), 
     'tarname': ('TC0Bool', 'bool'),
     'incfiles': 'basics.h',
     'srcfiles': _fromsrcdir('basics.[ch]*')}, 
    apiname('Untemplated', **_inbasics), 
    apiname('ThreeNums', tarbase='pybasics', **_inbasics),
    apiname('*', **_indiscovery),
    apiname(('TClass0', 'float32'), **_inbasics), 
    apiname(('TClass2', 'float32'), **_inbasics), 
    apiname('NoDefault', **_inbasics), 
    apiname('NoDefaultChild', **_inbasics), 
    apiname(('EnumArg', 'JOAN'), tarbase='pybasics', **_inbasics),
    ]

del os
del apiname


[(75, 'os.path.join', 'os.path.join', (['"""src"""', 'x'], {}), False, 'import os\n'), (86, 'xdress.utils.apiname', 'apiname', (['"""PersonID"""'], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n'), (87, 'xdress.utils.apiname', 'apiname', (['"""*"""'], {}), False, 'from xdress.utils import apiname\n'), (91, 'xdress.utils.apiname', 'apiname', (['"""voided"""'], {}), False, 'from xdress.utils import apiname\n'), (92, 'xdress.utils.apiname', 'apiname', (['"""pairs_be_crazy"""'], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n'), (93, 'xdress.utils.apiname', 'apiname', (['"""call_with_void_fp_struct"""'], {}), False, 'from xdress.utils import apiname\n'), (98, 'xdress.utils.apiname', 'apiname', (['"""func1"""'], {}), False, 'from xdress.utils import apiname\n'), (99, 'xdress.utils.apiname', 'apiname', (['"""func2"""'], {}), False, 'from xdress.utils import apiname\n'), (100, 'xdress.utils.apiname', 'apiname', (['"""func3"""'], {}), False, 'from xdress.utils import apiname\n'), (101, 'xdress.utils.apiname', 'apiname', (['"""func4"""'], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n'), (102, 'xdress.utils.apiname', 'apiname', (['"""setfunc"""'], {}), False, 'from xdress.utils import apiname\n'), (103, 'xdress.utils.apiname', 'apiname', (["('findmin', 'int32', 'float32')"], {}), False, 'from xdress.utils import apiname\n'), (104, 'xdress.utils.apiname', 'apiname', (["('findmin', 'float64', 'float32')"], {}), False, 'from xdress.utils import apiname\n'), (113, 'xdress.utils.apiname', 'apiname', (["('lessthan', 'int32', 3)"], {}), False, 'from xdress.utils import apiname\n'), (114, 'xdress.utils.apiname', 'apiname', (['"""call_threenums_op_from_c"""'], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n'), (115, 'xdress.utils.apiname', 'apiname', (['"""*"""'], {}), False, 'from xdress.utils import apiname\n'), (120, 'xdress.utils.apiname', 'apiname', (['"""Union0"""'], {}), False, 'from xdress.utils import apiname\n'), (121, 'xdress.utils.apiname', 'apiname', (['"""VoidFPStruct"""'], {}), False, 'from xdress.utils import apiname\n'), (122, 'xdress.utils.apiname', 'apiname', (['"""A"""'], {}), False, 'from xdress.utils import apiname\n'), (123, 'xdress.utils.apiname', 'apiname', (['"""B"""'], {}), False, 'from xdress.utils import apiname\n'), (124, 'xdress.utils.apiname', 'apiname', (['"""C"""'], {}), False, 'from xdress.utils import apiname\n'), (125, 'xdress.utils.apiname', 'apiname', (['"""SomeCrazyPairValue"""'], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n'), (127, 'xdress.utils.apiname', 'apiname', (["('TClass1', 'int32')"], {}), False, 'from xdress.utils import apiname\n'), (128, 'xdress.utils.apiname', 'apiname', (["('TClass1', 'float64')"], {}), False, 'from xdress.utils import apiname\n'), (133, 'xdress.utils.apiname', 'apiname', (["('TClass0', 'int32')"], {}), False, 'from xdress.utils import apiname\n'), (134, 'xdress.utils.apiname', 'apiname', (["('TClass0', 'float64')"], {}), False, 'from xdress.utils import apiname\n'), (139, 'xdress.utils.apiname', 'apiname', (['"""Untemplated"""'], {}), False, 'from xdress.utils import apiname\n'), (140, 'xdress.utils.apiname', 'apiname', (['"""ThreeNums"""'], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n'), (141, 'xdress.utils.apiname', 'apiname', (['"""*"""'], {}), False, 'from xdress.utils import apiname\n'), (142, 'xdress.utils.apiname', 'apiname', (["('TClass0', 'float32')"], {}), False, 'from xdress.utils import apiname\n'), (143, 'xdress.utils.apiname', 'apiname', (["('TClass2', 'float32')"], {}), False, 'from xdress.utils import apiname\n'), (144, 'xdress.utils.apiname', 'apiname', (['"""NoDefault"""'], {}), False, 'from xdress.utils import apiname\n'), (145, 'xdress.utils.apiname', 'apiname', (['"""NoDefaultChild"""'], {}), False, 'from xdress.utils import apiname\n'), (146, 'xdress.utils.apiname', 'apiname', (["('EnumArg', 'JOAN')"], {'tarbase': '"""pybasics"""'}), False, 'from xdress.utils import apiname\n')]