def generateErrorSource(apis, args): funcDefine = apiErrorFuncDefineCode( apis, args ) funcInit = apiDispatchFuncInitCode( apis, args, 'error' ) substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Error' substitute['LOCAL_INCLUDE'] = '' substitute['LOCAL_CODE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['IFDEF'] = '#if REGAL_ERROR\n\n' substitute['ENDIF'] = '#endif\n' outputCode( '%s/RegalDispatchError.cpp' % args.outdir, dispatchSourceTemplate.substitute(substitute))
def generateMissingSource(apis, args): # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Missing' substitute['LOCAL_INCLUDE'] = '' substitute['LOCAL_CODE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = apiMissingFuncDefineCode( apis, args ) substitute['API_DISPATCH_FUNC_INIT'] = apiDispatchFuncInitCode( apis, args, 'missing' ) substitute['IFDEF'] = '' substitute['ENDIF'] = '' outputCode( '%s/RegalDispatchMissing.cpp' % args.srcdir, dispatchSourceTemplate.substitute(substitute))
def generateDebugSource(apis, args): funcDefine = apiDebugFuncDefineCode( apis, args ) funcInit = apiDispatchFuncInitCode( apis, args, 'debug' ) # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Debug' substitute['LOCAL_INCLUDE'] = debugGlobalCode substitute['LOCAL_CODE'] = debugLocalCode substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['IFDEF'] = '#if REGAL_DEBUG\n\n' substitute['ENDIF'] = '#endif\n' outputCode( '%s/RegalDispatchDebug.cpp' % args.outdir, dispatchSourceTemplate.substitute(substitute))
def generateMissingSource(apis, args): # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Missing' substitute['LOCAL_INCLUDE'] = '' substitute['LOCAL_CODE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = apiMissingFuncDefineCode( apis, args) substitute['API_DISPATCH_FUNC_INIT'] = apiDispatchFuncInitCode( apis, args, 'missing') substitute['IFDEF'] = '' substitute['ENDIF'] = '' outputCode('%s/RegalDispatchMissing.cpp' % args.outdir, dispatchSourceTemplate.substitute(substitute))
def generateLoaderSource(apis, args): funcDefine = apiLoaderFuncDefineCode( apis, args ) funcInit = apiDispatchFuncInitCode( apis, args, 'loader' ) # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Loader' substitute['LOCAL_CODE'] = loaderLocalCode substitute['LOCAL_INCLUDE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['IFDEF'] = '#if REGAL_DRIVER && !defined(__native_client__)\n\n' substitute['ENDIF'] = '#endif\n' outputCode( '%s/RegalDispatchLoader.cpp' % args.outdir, dispatchSourceTemplate.substitute(substitute))
def generateDispatchStatistics(apis, args): funcDefine = apiStatisticsFuncDefineCode( apis, args ) funcInit = apiDispatchFuncInitCode( apis, args, 'statistics' ) # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Statistics' substitute['LOCAL_INCLUDE'] = '#include "RegalStatistics.h"' substitute['LOCAL_CODE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['API_DISPATCH_GLOBAL_FUNC_INIT'] = '' substitute['IFDEF'] = '#if REGAL_STATISTICS\n\n' substitute['ENDIF'] = '#endif\n' outputCode( '%s/RegalDispatchStatistics.cpp' % args.srcdir, dispatchSourceTemplate.substitute(substitute))
def generateDebugSource(apis, args): funcDefine = apiDebugFuncDefineCode(apis, args) funcInit = apiDispatchFuncInitCode(apis, args, 'debug') # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Debug' substitute['LOCAL_INCLUDE'] = debugGlobalCode substitute['LOCAL_CODE'] = debugLocalCode substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['IFDEF'] = '#if REGAL_DEBUG\n\n' substitute['ENDIF'] = '#endif\n' outputCode('%s/RegalDispatchDebug.cpp' % args.outdir, dispatchSourceTemplate.substitute(substitute))
def generateLoaderSource(apis, args): funcDefine = apiLoaderFuncDefineCode(apis, args) funcInit = apiDispatchFuncInitCode(apis, args, 'loader') # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Loader' substitute['LOCAL_CODE'] = loaderLocalCode substitute['LOCAL_INCLUDE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['IFDEF'] = '#if REGAL_DRIVER && !defined(__native_client__)\n\n' substitute['ENDIF'] = '#endif\n' outputCode('%s/RegalDispatchLoader.cpp' % args.outdir, dispatchSourceTemplate.substitute(substitute))
def generateDispatchStatistics(apis, args): funcDefine = apiStatisticsFuncDefineCode(apis, args) funcInit = apiDispatchFuncInitCode(apis, args, 'statistics') # Output substitute = {} substitute['LICENSE'] = args.license substitute['AUTOGENERATED'] = args.generated substitute['COPYRIGHT'] = args.copyright substitute['DISPATCH_NAME'] = 'Statistics' substitute['LOCAL_INCLUDE'] = '#include "RegalStatistics.h"' substitute['LOCAL_CODE'] = '' substitute['API_DISPATCH_FUNC_DEFINE'] = funcDefine substitute['API_DISPATCH_FUNC_INIT'] = funcInit substitute['API_DISPATCH_GLOBAL_FUNC_INIT'] = '' substitute['IFDEF'] = '#if REGAL_STATISTICS\n\n' substitute['ENDIF'] = '#endif\n' outputCode('%s/RegalDispatchStatistics.cpp' % args.srcdir, dispatchSourceTemplate.substitute(substitute))