def test(self):
        "codes for boost python binding"
        from mcstas2.wrappers.component2cppClass.component2cppClass import component2cppClass
        klass = component2cppClass( componentfile )

        from mcstas2.utils.parsers import parseComponent
        compinfo = parseComponent( componentfile )
        
        # create directory
        dir = "E_monitor"
        if not os.path.exists(dir):
            os.makedirs(dir)

        from mcstas2.wrappers.pymodule import generate
        sources = generate( compinfo, bpbindingname, projectpath )

        self.assertEqual( sources[0], '%s/%s.py' %(componentname, componentname) )
        return
Beispiel #2
0
    def test(self):
        "codes for boost python binding"
        from mcstas2.wrappers.component2cppClass.component2cppClass import component2cppClass
        klass = component2cppClass(componentfile)

        from mcstas2.utils.parsers import parseComponent
        compinfo = parseComponent(componentfile)

        # create directory
        dir = "E_monitor"
        if not os.path.exists(dir):
            os.makedirs(dir)

        from mcstas2.wrappers.pymodule import generate
        sources = generate(compinfo, bpbindingname, projectpath)

        self.assertEqual(sources[0],
                         '%s/%s.py' % (componentname, componentname))
        return
    def test(self):
        "codes for boost python binding"
        # create directory
        dir = componentname
        if not os.path.exists(dir):
            os.makedirs(dir)

        from mcstas2.wrappers.binding.boostpython.module_cc import generate
        module_cc = generate( bpbindingname, wrapmethodname, projectpath )

        from mcstas2.wrappers.component2cppClass.component2cppClass import component2cppClass
        klass = component2cppClass( componentfile )

        from mcstas2.utils.mills.cxx.factory import createHHandCC
        createHHandCC( klass, projectpath )
        
        ctor = klass.constructors() [0]
        from mcstas2.wrappers.binding.boostpython.wrap_cc import generate
        wrap_cc = generate( klass, projectpath, wrapmethodname)

        return