Beispiel #1
0
 def beginFile(self, genOpts):
     AutomaticSourceOutputGenerator.beginFile(self, genOpts)
     self.conventions = self.genOpts.conventions
     self.env.globals['filename'] = genOpts.filename
     self.env.tests['cpp_hidden_member'] = self._cpp_hidden_member
     self.env.tests['struct_output'] = self._is_struct_output
     self.env.tests['struct_input'] = self._is_struct_input
     self.template = JinjaTemplate(self.env,
                                   "template_{}".format(genOpts.filename))
    def beginFile(self, genOpts):
        AutomaticSourceOutputGenerator.beginFile(self, genOpts)
        preamble = ''
        if self.genOpts.filename == 'xr_generated_dispatch_table.h':
            preamble += '#pragma once\n'
        elif self.genOpts.filename == 'xr_generated_dispatch_table.c':
            preamble += '#include "xr_generated_dispatch_table.h"\n'

        preamble += '#include "xr_dependencies.h"\n'
        preamble += '#include <openxr/openxr.h>\n'
        preamble += '#include <openxr/openxr_platform.h>\n\n'
        write(preamble, file=self.outFile)
Beispiel #3
0
    def beginFile(self, genOpts):
        AutomaticSourceOutputGenerator.beginFile(self, genOpts)
        preamble = ''

        if self.genOpts.filename == 'xr_generated_loader.hpp':
            preamble += '#pragma once\n'
            preamble += '#include <unordered_map>\n'
            preamble += '#include <thread>\n'
            preamble += '#include <mutex>\n\n'
            preamble += '#include "xr_dependencies.h"\n'
            preamble += '#include "openxr/openxr.h"\n'
            preamble += '#include "openxr/openxr_platform.h"\n\n'
            preamble += '#include "loader_interfaces.h"\n\n'
            preamble += '#include "loader_instance.hpp"\n\n'
            preamble += '#include "loader_platform.hpp"\n\n'

        elif self.genOpts.filename == 'xr_generated_loader.cpp':
            preamble += '#include "xr_generated_loader.hpp"\n\n'
            preamble += '#include "api_layer_interface.hpp"\n'
            preamble += '#include "exception_handling.hpp"\n'
            preamble += '#include "hex_and_handles.h"\n'
            preamble += '#include "loader_instance.hpp"\n'
            preamble += '#include "loader_logger.hpp"\n'
            preamble += '#include "loader_platform.hpp"\n'
            preamble += '#include "runtime_interface.hpp"\n'
            preamble += '#include "xr_generated_dispatch_table.h"\n\n'

            preamble += '#include "xr_dependencies.h"\n'
            preamble += '#include <openxr/openxr.h>\n'
            preamble += '#include <openxr/openxr_platform.h>\n\n'

            preamble += '#include <cstring>\n'
            preamble += '#include <memory>\n'
            preamble += '#include <new>\n'
            preamble += '#include <string>\n'
            preamble += '#include <unordered_map>\n'

        write(preamble, file=self.outFile)
 def beginFile(self, genOpts):
     AutomaticSourceOutputGenerator.beginFile(self, genOpts)
     self.template = JinjaTemplate(self.env, "template_{}".format(genOpts.filename))