在C++中,类的构造函数可以省略不写,这时C++会为它自动创建一个隐式默认构造函数(implicit default constructor);也可以由用户定义带参数的构造函数,构造函数也是一个成员函数,他可以被重载;当一个构造函数只有一个参数,而且该参数又不是本类的const引用时,这种构造函数称为转换构造函数。
构造函数读取配置参数文件作为属性并将这些属性转换成 URI/值对,这些值对是由部署描述符模式定义的(图 1) 。
The constructor method reads the configuration parameters file as properties and converts these properties into URI/value pairs as defined by the deployment descriptor schema (Figure 1).
构造函数中的第一个参数是被转换成LiveGrid的html表的id。
The first parameter in the constructor is the id of the HTML table that will be converted into a LiveGrid.
这个函数简单地将元素标识符转换为一个指针,然后调用构造函数,将其他参数不加修改地传递给构造函数。
The function simply converts the element identifier into a pointer and then calls the constructor, passing the remaining arguments unchanged.
应用推荐