You can easily combine Listings 3 and 5 to make a generic code template handler.
您可以轻松地将清单3和清单5组合起来,获得一个通用代码模板处理器。
Code template parameters are used in a manner similar to the pattern template parameters.
代码模板参数使用的方式与模式模板参数很相似。
Refer to the documentation in the Resources section for advanced code template scenarios.
参考 参考资料部分的文档以了解高级代码模板的内容。
According to the database schema information and customized code template, code is built for business logic layer.
本文叙述根据数据库架构信息和定制的代码模板自动生成业务逻辑层代码的实现方法。
Problems discovered during unit testing are fixed in the corresponding pattern or code template, not in the generated code.
单元测试期间发现的问题在相应的模式或代码模板中就可以修改,而不是在生成的代码中修改。
This opens a wizard in which you can assign the code template a name, and then define template Parameters and a Body (Figure 29).
这将打开向导,其中您可以指定代码模板的名称,然后定义TemplateParameters和Body(图29)。
Binding a code template to an operation in a pattern will cause that code to be generated when the code and model are synchronized.
在模式中,当代码和模式同步时,把代码模板绑定到一个操作,便会生成相应代码。
Code a template to match the elements to output the element.
编写一个模板,匹配元素,将其输出到元素中。
So, to change what the compiled template code looks like, we just have to create a new skeleton file and perform whatever customization we want, but still leave these basic elements in place.
因此,要修改编译后的模板代码的样子,我们只需要创建一个新的骨架文件并进行自己想要的定制即可,但是仍然要在原来的地方保留基本的元素。
Listing 2 contains a code example of defining a file template.
清单2包含一个文件模板定义代码示例。
Listing 12 shows the code for the panel template.
清单12给出了此面板模板的相应代码。
To help speed development, in addition to the code intelligence features, the IDE has an excellent canned template library of code samples to which you can add on.
除了代码智能特性,为了加速开发,这款 IDE有一个极好的代码示例整体模板库,您还可以向库里面添加内容。
This variable is set in the PHP code invoking the template, as you'll see later in this section.
这个变量是在调用模板的PHP代码中设置的,您将会在本节的后面看到。
Templating — The ability to create a template for page code reuse and substitution.
模板化 ——能够创建用于页面代码重用和取代的模板。
For convenience, you can package the code in a common XSL template for string replacement, thus making it reusable.
为简便起见,您可以将代码打包成用于字符串替代的公共XSL模板,以使它可重用。
Listing 10 shows the sample build script template code.
清单10显示了示例构建脚本模板代码。
The text template can generate code and configuration files that implement that flow of control.
文本模板可以生成流程控制的代码和配置文件。
The contents of this template might go directly in the first template, but the code is easier to follow if you split it out.
该模板的内容容可以直接用于第一个模板,但如果将其分开,代码就很容易理解。
Modifying the template to execute the desired kernel code is relatively straightforward.
修改模板来执行期望的内核代码相对也比较简单。
The project template for code refactoring doesn't include a usable demo, but the same techniques shown in the Quick Fix walkthrough can be used here.
为代码重构所提供的项目模板中并没有包含可用的演示程序,但是在此我们可以使用快速修正教程中所展示的相同技术。
If you check the XML definition file, you can see the code for your new template.
如果您核查xml定义文件,您可以看到您的新模版代码。
The PHP code used within a template is used exclusively to transform the data into a well-structured XHTML content fragment that is easily styled using CSS.
模板中的PHP代码专门用来将数据转换为结构良好的XHTML内容片段,从而可以使用css轻松地应用样式。
The SQL module must also contain the format template code as shown in Listing 2.
SQL模块也必须包含格式模板代码,如 清单2 所示。
You might try to clean up this code a bit by packaging the key lookup code in a named template.
您可能希望将键查找代码打包在指定模板中,使代码更加清晰。
The easiest way to implement DHTML is to first write it in a plain HTML page, without PHP or any server-side language, then use that code as a template for the PHP code to generate the DHTML.
实现DHTML最简便的方法就是首先在平面HTML页面中编写,不使用PHP或任何服务器端语言,随后以该代码作为PHP代码模板来生成DHTML。
The generated code for the template class one has both the declaration and definition for the operation op within the template class declaration, as shown in Listing 7.
为模板类一所生成的代码具有在模板类声明内部用于操作的声明和定义,如列表7中所示。
XSLT 2.0 offers expanded language capabilities to developers seeking a template engine for code generation.
XSLT 2.0为寻求代码生成模板引擎的开发人员提供了广泛的语言能力。
You don't have to worry about managing resources because that code is in the template.
您也不必担心管理资源,因为代码是在模板中。
The first method is one that doesn't even appear in the source code for my template class back in Listing 1, the default constructor for the class.
清单1中的模板类源代码是类的默认构造函数,第一个方法没有出现在其中。
Listing 7. Generated Code for a template class.
列表7.为一个模板类所生成的代码。
应用推荐