(self, routines, f, prefix, header=True, empty=True)
Write the code file by calling language specific methods in correct order

        The generated file contains all the definitions of the routines in
        low-level code and refers to the header file if appropriate.

        :Arguments:

        routines
            A list of Routine instances
        f
            A file-like object to write the file to
        prefix
            The filename prefix, used to refer to the proper header file. Only
            the basename of the prefix is used.

        :Optional arguments:

        header
            When True, a header comment is included on top of each source file.
            [DEFAULT=True]
        empty
            When True, empty lines are included to structure the source files.
            [DEFAULT=True]
Write the code file by calling language specific methods in correct order
Write the code file by calling language specific methods in correct order
def dump_code(self, routines, f, prefix, header=True, empty=True):
        """Write the code file by calling language specific methods in correct order

        The generated file contains all the definitions of the routines in
        low-level code and refers to the header file if appropriate.

        :Arguments:

        routines
            A list of Routine instances
        f
            A file-like object to write the file to
        prefix
            The filename prefix, used to refer to the proper header file. Only
            the basename of the prefix is used.

        :Optional arguments:

        header
            When True, a header comment is included on top of each source file.
            [DEFAULT=True]
        empty
            When True, empty lines are included to structure the source files.
            [DEFAULT=True]
        """

        code_lines = self._preprocessor_statements(prefix)

        for routine in routines:
            if empty:
                code_lines.append("\n")
            code_lines.extend(self._get_routine_opening(routine))
            code_lines.extend(self._declare_arguments(routine))
            code_lines.extend(self._declare_locals(routine))
            if empty:
                code_lines.append("\n")
            code_lines.extend(self._call_printer(routine))
            if empty:
                code_lines.append("\n")
            code_lines.extend(self._get_routine_ending(routine))

        code_lines = self._indent_code(''.join(code_lines))

        if header:
            code_lines = ''.join(self._get_header() + [code_lines])

        if code_lines:
            f.write(code_lines)
def dump_code ( self , routines , f , prefix , header = True , empty = True ) : code_lines = self . _preprocessor_statements ( prefix ) for routine in routines : if empty : code_lines . append ( "\n" ) code_lines . extend ( self . _get_routine_opening ( routine ) ) code_lines . extend ( self . _declare_arguments ( routine ) ) code_lines . extend ( self . _declare_locals ( routine ) ) if empty : code_lines . append ( "\n" ) code_lines . extend ( self . _call_printer ( routine ) ) if empty : code_lines . append ( "\n" ) code_lines . extend ( self . _get_routine_ending ( routine ) ) code_lines = self . _indent_code ( '' . join ( code_lines ) ) if header : code_lines = '' . join ( self . _get_header ( ) + [ code_lines ] ) if code_lines : f . write ( code_lines )