当前位置: 首页>>代码示例>>Python>>正文


Python OutputGenerator.genCmd方法代码示例

本文整理汇总了Python中generator.OutputGenerator.genCmd方法的典型用法代码示例。如果您正苦于以下问题:Python OutputGenerator.genCmd方法的具体用法?Python OutputGenerator.genCmd怎么用?Python OutputGenerator.genCmd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在generator.OutputGenerator的用法示例。


在下文中一共展示了OutputGenerator.genCmd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: genCmd

# 需要导入模块: from generator import OutputGenerator [as 别名]
# 或者: from generator.OutputGenerator import genCmd [as 别名]
    def genCmd(self, cmdinfo, name, alias):
        OutputGenerator.genCmd(self, cmdinfo, name, alias)

        # @@@ (Jon) something needs to be done here to handle aliases, probably

        self.makeThreadSafetyBlocks(cmdinfo.elem, 'param')

        self.writeInclude()
开发者ID:krOoze,项目名称:Vulkan-Docs,代码行数:10,代码来源:hostsyncgenerator.py

示例2: genCmd

# 需要导入模块: from generator import OutputGenerator [as 别名]
# 或者: from generator.OutputGenerator import genCmd [as 别名]
    def genCmd(self, cmdinfo, name, alias):
        OutputGenerator.genCmd(self, cmdinfo, name, alias)

        # if alias:
        #     prefix = '// ' + name + ' is an alias of command ' + alias + '\n'
        # else:
        #     prefix = ''

        prefix = ''
        decls = self.makeCDecls(cmdinfo.elem)
        self.appendSection('command', prefix + decls[0] + '\n')
        if self.genOpts.genFuncPointers:
            self.appendSection('commandPointer', decls[1])
开发者ID:krOoze,项目名称:Vulkan-Docs,代码行数:15,代码来源:cgenerator.py

示例3: genCmd

# 需要导入模块: from generator import OutputGenerator [as 别名]
# 或者: from generator.OutputGenerator import genCmd [as 别名]
    def genCmd(self, cmdinfo, name, alias):
        OutputGenerator.genCmd(self, cmdinfo, name, alias)

        return_type = cmdinfo.elem.find('proto/type')
        if self.genOpts.conventions.requires_error_validation(return_type):
            # This command returns an API result code, so check that it
            # returns at least the required errors.
            required_errors = self.genOpts.conventions.required_errors
            errorcodes = cmdinfo.elem.get('errorcodes').split(',')
            if not required_errors.issubset(set(errorcodes)):
                self.logMsg('error', 'Missing required error code for command: ', name, '\n')
                exit(1)

        decls = self.makeCDecls(cmdinfo.elem)
        self.writeInclude('protos', name, decls[0])
开发者ID:krOoze,项目名称:Vulkan-Docs,代码行数:17,代码来源:docgenerator.py

示例4: genCmd

# 需要导入模块: from generator import OutputGenerator [as 别名]
# 或者: from generator.OutputGenerator import genCmd [as 别名]
    def genCmd(self, cmdinfo, name, alias):
        OutputGenerator.genCmd(self, cmdinfo, name, alias)

        if alias:
            # Add name -> alias mapping
            self.addName(self.alias, name, alias)
        else:
            # May want to only emit definition on this branch
            True

        # Add a typeCategory{} entry for the category of this type.
        self.addName(self.typeCategory, name, 'protos')

        params = [param.text for param in cmdinfo.elem.findall('param/name')]
        self.protos[name] = params
        paramTypes = [param.text for param in cmdinfo.elem.findall('param/type')]
        for param_type in paramTypes:
            self.addMapping(name, param_type)
开发者ID:krOoze,项目名称:Vulkan-Docs,代码行数:20,代码来源:pygenerator.py


注:本文中的generator.OutputGenerator.genCmd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。