Ejemplo n.º 1
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        if hasattr( args , "filename" ) :
            for filename in args.filename:
                filename = code_template_helpers.check_filename_ending( filename , "cpp" )
                code_template_helpers.default_processing( filename , replacements , template )
Ejemplo n.º 2
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        code_template_helpers.add_namespace_replacements( replacements , args , [ "SuperToll" ] )
        code_template_helpers.add_class_replacements( replacements , args , code_template_helpers.default_class_template )
            
        if hasattr( args , "filename" ) :
            for filename in args.filename:
                filename = code_template_helpers.check_filename_ending( filename , "h" )
                code_template_helpers.default_processing( filename , replacements , template )
Ejemplo n.º 3
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        path = code_template_helpers.find_odeint_lib_path()


        if hasattr( args , "filename" ) :
            for filename in args.filename:
                filename = code_template_helpers.check_filename_ending( filename , "cpp" )
                p = path
                p.append( filename )
                replacements[ "BOOSTFILENAME" ] = code_template_helpers.full_join( p )
                code_template_helpers.default_processing( filename , replacements , template )
Ejemplo n.º 4
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        replacements[ "TARGET" ] = ""
        replacements[ "TARGETS" ] = ""
        if ( hasattr( args , "target" ) ) and ( args.target is not None ) and ( len( args.target ) != 0 ) :
            for target in args.target:
                print "* Found target " + target
                replacements[ "TARGET" ] += ( target + " " )
                replacements[ "TARGETS" ] += ( target + " : " + target + ".o" + "\n" )
            
        if hasattr( args , "filename" ) :
            for filename in args.filename:
                code_template_helpers.default_processing( filename , replacements , template )
Ejemplo n.º 5
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        replacements[ "TESTNAME" ] = ""

        if hasattr( args , "testname" ) and ( args.testname is not None ) :
            s = "Found test : " + args.testname
            print s
            replacements[ "TESTNAME" ] = args.testname


        if hasattr( args , "filename" ) :
            for filename in args.filename:
                filename = code_template_helpers.check_filename_ending( filename , "cpp" )
                code_template_helpers.default_processing( filename , replacements , template )
Ejemplo n.º 6
0
    def do_work(self, args, replacements):
        print "Creating " + self.name + " template(s) ..."

        replacements["TARGETS"] = ""
        if (hasattr(args, "target")) and (args.target is not None) and (len(args.target) != 0):
            for target in args.target:
                print "* Found target " + target
                p = os.path.splitext(target)
                if p[1] == ".cpp":
                    replacements["TARGETS"] += "add_executable ( " + p[0] + " " + p[0] + ".cpp" + " ) \n"
                else:
                    replacements["TARGETS"] += "add_executable ( " + target + " " + target + ".cpp" + " ) \n"

        if hasattr(args, "filename"):
            for filename in args.filename:
                code_template_helpers.default_processing(filename, replacements, template)
Ejemplo n.º 7
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        path = code_template_helpers.find_odeint_header_path()

        code_template_helpers.add_namespace_replacements( replacements , args , [ "boost" , "numeric" , "odeint" ] )
        code_template_helpers.add_class_replacements( replacements , args , code_template_helpers.default_class_template )
            
        if hasattr( args , "filename" ) :
            for filename in args.filename:
                filename = code_template_helpers.check_filename_ending( filename , "hpp" )
                p = path
                p.append( filename )
                f = code_template_helpers.full_join( p )
                replacements[ "BOOSTFILENAME" ] = f
                replacements[ "BOOSTFILENAME_CAP" ] = code_template_helpers.create_cap_boost_filename_str( f )
                code_template_helpers.default_processing( filename , replacements , template )
Ejemplo n.º 8
0
    def do_work( self , args , replacements ):
        print "Creating " + self.name + " template(s) ..."

        path = code_template_helpers.find_boost_path( [ "test" ] )

        replacements[ "TESTNAME" ] = "dummy"
        if hasattr( args , "test" ) and ( args.test is not None ) and ( len( args.test ) == 1 ):
            print "Found test " + args.test[0]
            replacements[ "TESTNAME" ] = args.test[0]


        if hasattr( args , "filename" ) :
            for filename in args.filename:
                filename = code_template_helpers.check_filename_ending( filename , "cpp" )
                p = path
                p.append( filename )
                replacements[ "BOOSTFILENAME" ] = code_template_helpers.full_join( p )
                code_template_helpers.default_processing( filename , replacements , template )