Ejemplo n.º 1
0
def externalVoodoo(input,
                   output,
                   linkTo,
                   pathToRemoveFromIdentifier="",
                   trace=False):
    inputLines = _readLinesOfFile(input)
    perFileSettings = PerFileSettings(inputLines)
    preprocessor = Preprocessor(linkTo, output, inputLines,
                                pathToRemoveFromIdentifier)

    out = preprocessor.externalHeader()
    out += '#include "VoodooConfiguration.h"\n'
    out += '#include <VoodooCommon/Common.h>\n\n'
    out += "namespace External\n{\n\n"
    iterator = VoodooMultiplexerIterator(perFileSettings)
    iterator.process(input)
    out += iterator.iter()
    out += "\n}\n\n"
    out += preprocessor.externalSwitchToExpectation()
    out += '#include "VoodooCommon/All.h"\n\n'
    out += "namespace External\n{\n\n"
    out += iterator.expect()
    out += "\n}\n\n"
    out += preprocessor.externalFooter()
    return out
Ejemplo n.º 2
0
def voodoo(input,
           output,
           pathToRemoveFromIdentifier,
           voodooDBFile,
           includes,
           defines,
           preIncludes,
           trace=False):
    inputLines = _readLinesOfFile(input)
    perFileSettings = PerFileSettings(inputLines)
    preprocessor = Preprocessor(input, output, inputLines,
                                pathToRemoveFromIdentifier)

    out = preprocessor.header()
    out += '#include <VoodooCommon/Common.h>\n\n'
    iterator = VoodooMultiplexerIterator(perFileSettings, voodooDBFile)
    iterator.process(input,
                     includes=includes,
                     defines=defines,
                     preIncludes=preIncludes)
    out += iterator.iter()
    out += preprocessor.switchToExpectation()
    out += '#include "VoodooCommon/All.h"\n\n'
    out += iterator.expect()
    out += preprocessor.footer()
    return out
Ejemplo n.º 3
0
def voodooExpectHeader( input, output, pathToRemoveFromIdentifier, voodooDBFile, includes, defines, preIncludes, trace = False ):
	inputLines = _readLinesOfFile( input )
	perFileSettings = PerFileSettings( inputLines )
	preprocessor = Preprocessor( input, output, inputLines, pathToRemoveFromIdentifier )

	iterator = VoodooMultiplexerIterator( perFileSettings, voodooDBFile )
	iterator.process( input, includes = includes, defines = defines, preIncludes = preIncludes )

	out = preprocessor.headerOfHeader() + '\n'
        
	return out
Ejemplo n.º 4
0
def voodoo( input, output, pathToRemoveFromIdentifier, voodooDBFile, includes, defines, preIncludes, trace = False ):
	inputLines = _readLinesOfFile( input )
	perFileSettings = PerFileSettings( inputLines )
	preprocessor = Preprocessor( input, output, inputLines, pathToRemoveFromIdentifier )

	out = preprocessor.header()
	out += '#include <VoodooCommon/Common.h>\n\n'
	iterator = VoodooMultiplexerIterator( perFileSettings, voodooDBFile )
	iterator.process( input, includes = includes, defines = defines, preIncludes = preIncludes )
	out += iterator.iter()
	out += preprocessor.switchToExpectation()
	out += '#include "VoodooCommon/All.h"\n\n'
	out += iterator.expect()
	out += preprocessor.footer()
	return out
Ejemplo n.º 5
0
def externalVoodoo( input, output, linkTo, pathToRemoveFromIdentifier = "", trace = False ):
	inputLines = _readLinesOfFile( input )
	perFileSettings = PerFileSettings( inputLines )
	preprocessor = Preprocessor( linkTo, output, inputLines, pathToRemoveFromIdentifier )

	out = preprocessor.externalHeader()
	out += '#include "VoodooConfiguration.h"\n'
	out += '#include <VoodooCommon/Common.h>\n\n'
	out += "namespace External\n{\n\n"
	iterator = VoodooMultiplexerIterator( perFileSettings )
	iterator.process( input )
	out += iterator.iter()
	out += "\n}\n\n"
	out += preprocessor.externalSwitchToExpectation()
	out += '#include "VoodooCommon/All.h"\n\n'
	out += "namespace External\n{\n\n"
	out += iterator.expect()
	out += "\n}\n\n"
	out += preprocessor.externalFooter()
	return out
Ejemplo n.º 6
0
def voodooExpectHeader(input,
                       output,
                       pathToRemoveFromIdentifier,
                       voodooDBFile,
                       includes,
                       defines,
                       preIncludes,
                       trace=False):
    inputLines = _readLinesOfFile(input)
    perFileSettings = PerFileSettings(inputLines)
    preprocessor = Preprocessor(input, output, inputLines,
                                pathToRemoveFromIdentifier)

    iterator = VoodooMultiplexerIterator(perFileSettings, voodooDBFile)
    iterator.process(input,
                     includes=includes,
                     defines=defines,
                     preIncludes=preIncludes)

    out = preprocessor.headerOfHeader() + '\n'

    return out