Define a constructor function which initializes the required data.
定义一个构造器函数来初始所需的数据。
The constructor function has the same name as the structured type with which it is associated.
构造函数和它关联的结构化类型有相同的名称。
Once I have a constructor function, I can use the new operator to create objects, as shown below
拥有构造函数之后,就可以使用new操作符来创建对象了,如下所示
The constructor function has no parameters and returns an instance of the type with all of its attributes set to null values.
构造函数没有参数,并且返回的类型实例中的所有属性都为空。
The instance of the <ui:button> is passed as a parameter to the constructor function and I keep a reference to it as this.element.
<ui:button>的实例被作为参数传递给构造函数,我使用 this.element保持对它的引用。
The constructor function begins on line 12.
构造函数从第12行开始。
Illustrates how to use inheritance to add a common set of properties and methods to objects created with a given constructor function.
阐释如何使用继承将一组通用属性和方法添加到用给定构造函数创建的对象。
The constructor function is invoked immediately prior to main being called; and the destructor function is called when your application exits.
constructor函数是在调用main函数之前调用的,而destructor 函数则是在应用程序退出时调用的。
Therefore, it might be worthwhile to restructure your spatial query to ensure just a single call to the constructor function using common table expressions.
因此,可能有必要使用公共表表达式重新构造空间查询,以确保只调用一次构造函数。
When you want to create an atomic value of one of the time-oriented data types, use a type-constructor function and provide the string representation as an argument.
如果需要创建与时间相关的数据类型的单个值,可以使用类型构造器函数并提供时间的字符串表示形式作为参数。
The core of the listing is the defnode macro that takes a node type and a vector of field names, and creates a constructor function for creating maps of that type.
这个清单的核心是defnode宏,它获取一个节点类型和一个字段名矢量,并创建一个构造函数来创建该类型的映射。
If you are familiar with the basics of object-oriented programming, you will know that when an object is instantiated, the class constructor function is automatically called.
如果您对面向对象编程语言基本原理比较熟悉,您就知道当一个对象被实例化时,类构造函数被自动调用。
When you create a structured type, DB2 automatically creates a constructor function for the type and creates both mutator and observer methods for the attributes of the type.
当您创建结构化类型时,DB 2为类型自动创建一个构造函数,并为类型的属性创建mutator方法和observer方法。
In the constructor function, a new trace file is opened into which the profiling address trace will be written; within the destructor function, the trace file is closed (see Listing 3).
在constructor函数中,会打开一个新的跟踪文件,分析数据的地址跟踪就是写入这个文件的;在destructor函数中,会关闭这个跟踪文件(参见清单3)。
If the record is not found, I create a new Employee prototype by invoking the Employee constructor function with the appropriate fields from the panel. Here's the Employee constructor function.
如果没有找到记录,就使用面板中适当的字段,调用Employee构造函数创建一个新的Employee原型。
When invoked with the new operator, the constructor function creates what is known as a prototype for an object; that is, it creates a template from which to build objects of the given kind.
当调用new操作符时,构造函数就为对象创建一个所谓的原型(prototype);也就是说,它创建了一个模板(template),从中构建给定类型的对象。
Fortunately, Rhino provides another way to create objects, using the constructor function. For example, the following function might serve as a constructor function for an object of type person.
幸运的是,Rhino提供了另外一种创建对象的方法:使用构造函数(constructor function)。
Fortunately, Rhino provides another way to create objects, using the constructor function. For example, the following function might serve as a constructor function for an object of type person.
幸运的是,Rhino提供了另外一种创建对象的方法:使用构造函数(constructor function)。
应用推荐