The constructor function begins on line 12.
构造函数从第12行开始。
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操作符来创建对象了,如下所示
It can also detect if a constructor function of a schema-type is supported; more about that in a moment.
还可以检查是否支持模式类型的构造器函数,特别是在当时。
The code for the MainFrame constructor function and for the instantiation and display of the frame is provided in Listing 2.
清单2中提供了用于MainFrame构造函数、实例和显示画面所使用的代码。
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保持对它的引用。
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.
因此,可能有必要使用公共表表达式重新构造空间查询,以确保只调用一次构造函数。
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宏,它获取一个节点类型和一个字段名矢量,并创建一个构造函数来创建该类型的映射。
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.
如果需要创建与时间相关的数据类型的单个值,可以使用类型构造器函数并提供时间的字符串表示形式作为参数。
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)。
The function simply converts the element identifier into a pointer and then calls the constructor, passing the remaining arguments unchanged.
这个函数简单地将元素标识符转换为一个指针,然后调用构造函数,将其他参数不加修改地传递给构造函数。
You can give it a name (that is, a class name), specify parameters (as in a constructor), and even use the .this keyword, which basically means referencing a variable within the scope of the function.
可以给其一个名称(也就是一个类名),指定参数(和在构造函数中一样),甚至可以使用关键字 .this,这意味着在函数范围内引用变量。
The RequiredValidator() constructor (see Listing 6) takes the same parameters as the Validator() function.
RequiredValidator()构造函数(参见清单6)的参数与Validator()函数相同。
And, because every function in the Student controller touches the template view, you need to load the URL Helper as part of the Student constructor (see Listing 14).
并且,由于Student控制器内的每个函数都会接触到模板视图,所以需要加载urlHelper,作为Student构造函数的一部分(参见清单14)。
The LotteryFactory's constructor seeds the rand function used by our lottery classes.
LotteryFactory的构造函数将构造我们的彩票类所使用的rand函数。
The range function is simply a list constructor, very similar to the range function in Python, or the..
range函数只是一个list构造函数,非常类似于Python中的range函数,或者是Haskell或Perl中的. .。
We specify the callback for the Scale widget not in its constructor, but later, using the configure function.
我们没有在它的构造函数中指定Scale窗口小部件的回调,而是稍后使用configure来指定。
The constructor is used to form a delegate over a target object and a function pointer.
这构造器用来通过一个目标对象和一个函数指针形成一个委托。
Making it private is the "old" way of doing it. The constructor still exists, but it is private, and can only be invoked from within another class member function.
使其私人的“旧”的方式这样做。构造函数仍然存在,但它是私人的,只能从内部调用另一个类的成员函数。
Making it private is the "old" way of doing it. The constructor still exists, but it is private, and can only be invoked from within another class member function.
使其私人的“旧”的方式这样做。构造函数仍然存在,但它是私人的,只能从内部调用另一个类的成员函数。
应用推荐