首页 > 其他 > 详细

CodeGen处理Synergy方法目录

时间:2020-12-15 10:30:05      阅读:28      评论:0      收藏:0      [点我收藏+]

CodeGen处理Synergy方法目录

如果Synergy应用程序开发环境包括使用Synergy/DE xfServerPlus,则可以基于Synergy方法目录中包含的元数据生成代码。要启用此功能,必须将方法目录导出到XML文件,然后使用-smc和-interface命令行选项(可选)。             

处理单个接口             

要处理单个接口,必须同时使用-smc和-interface选项。例如:

codegen -smc C:\my\files\smc.xml -interface MyInterface -t template –r

在模板文件中,可以使用方法循环来迭代作为被处理接口成员的方法,在方法循环中,可以使用方法循环扩展标记和方法循环表达式标记。

<METHOD_LOOP>

 

;Method loop code and tokens goes here

 

</METHOD_LOOP>

如果一个方法有参数,则可以使用参数循环迭代这些参数,并且在参数循环中可以使用参数循环扩展标记和参数循环表达式标记。

<METHOD_LOOP>

 

;Method loop code and tokens goes here

 

<PARAMETER_LOOP>

 

;Parameter loop code and tokens goes here

 

</PARMAETER_LOOP>

 

;Method loop code and tokens goes here

 

</METHOD_LOOP>

Processing All Interfaces

如果希望一次处理方法目录中定义的所有接口,请单独使用-smc选项,并在模板文件中使用接口循环。在接口循环内部,可以使用接口循环扩展标记和接口循环表达式标记。接口循环可以包含方法循环和参数循环:

<INTERFACE_LOOP>

 

;Interface loop code and tokens goes here

   

<METHOD_LOOP>

 

;Method loop code and tokens goes here

 

<PARAMETER_LOOP>

 

;Parameter loop code and tokens goes here

 

</PARMAETER_LOOP>

 

;Method loop code and tokens goes here

 

</METHOD_LOOP>

 

;Interface loop code and tokens goes here

 

</INTERFACE_LOOP>

 

CodeGen处理Synergy方法目录

原文:https://www.cnblogs.com/wujianming-110117/p/14136685.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!