def renderDefinitionFile(outputdir, source, definition, definitions): with open(os.path.join(outputdir, "%s.h" % definition.name), 'w') as out: define = headerDefine("cssom", definition.name, "h") print >> out, "#ifndef %s" % define print >> out, "#define %s" % define renderWarning(out, source) renderInclude(out, definition) print >> out print >> out, "#ifdef __cplusplus" print >> out, "extern \"C\" {" print >> out, "#endif" renderDefinition(out, definition, definitions) print >> out print >> out print >> out print >> out, "#ifdef __cplusplus" print >> out, "}" print >> out, "#endif" print >> out print >> out, "#endif"
def renderDefinitionFile(outputdir, source, definition, definitions): with open(os.path.join(outputdir, "%s.h" % definition.name), 'w') as out: define = headerDefine("cssom", definition.name, "h") print >>out, "#ifndef %s" % define print >>out, "#define %s" % define renderWarning(out, source) renderInclude(out, definition) print >>out print >>out, "#ifdef __cplusplus" print >>out, "extern \"C\" {" print >>out, "#endif" renderDefinition(out, definition, definitions) print >>out print >>out print >>out print >>out, "#ifdef __cplusplus" print >>out, "}" print >>out, "#endif" print >>out print >>out, "#endif"
def renderDefinitionHeaderFile(outputdir, source, definition, definitions): with open(os.path.join(outputdir, "%s.hpp" % definition.name), 'w') as out: define = headerDefine("cssompp", definition.name, "hpp") print >> out, "#ifndef %s" % define print >> out, "#define %s" % define renderWarning(out, source) renderInclude(out, definition) print >> out renderForwardDeclarations(out, forwards.get(definition.name, [])) print >> out print >> out, """namespace cssom {""" renderDefinition(out, definition, definitions) print >> out print >> out print >> out print >> out, "} // cssom" print >> out print >> out, "#endif // %s" "" % define
def renderDefinitionHeaderFile(outputdir, source, definition, definitions): with open(os.path.join(outputdir, "%s.hpp" % definition.name), 'w') as out: define = headerDefine("cssompp", definition.name, "hpp") print >>out, "#ifndef %s" % define print >>out, "#define %s" % define renderWarning(out, source) renderInclude(out, definition) print >>out renderForwardDeclarations(out, forwards.get(definition.name, [])) print >>out print >>out, """namespace cssom {""" renderDefinition(out, definition, definitions) print >>out print >>out print >>out print >>out, "} // cssom" print >>out print >>out, "#endif // %s""" % define