classRepresentation-class(methods)
classRepresentation-class()所属R语言包:methods
Class Objects
类对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These are the objects that hold the definition of classes of objects. They are constructed and stored as meta-data by calls to the function setClass. Don't manipulate them
这是举行的定义对象类的对象。他们建造和存储元数据,通过调用函数setClass。不要操纵他们
Details
详情----------Details----------
Class definitions are stored as metadata in various packages. Additional metadata supplies information on inheritance (the result of calls to setIs). Inheritance information implied by the class definition itself (because the class contains one or more other classes) is also constructed automatically.
类定义存储在各种包的元数据。额外的元数据供应信息上继承(调用setIs的结果)。继承类定义本身(因为类包含一个或多个其他类)所隐含的信息也被自动构造。
When a class is to be used in an R session, this information is assembled to complete the class definition. The completion is a second object of class "classRepresentation", cached for the session or until something happens to change the information. A call to getClass returns the completed definition of a class; a call to getClassDef returns the stored definition (uncompleted).
一类是在R会话时,此信息将组装完成的类定义。完成第二个对象是一类"classRepresentation",为会议或东西,直到缓存发生改变的信息。一个getClass调用返回完成类的定义,调用一个getClassDef返回存储的定义(未完成)。
In particular, completion fills in the upward- and downward-pointing inheritance information for the class, in slots contains and subclasses respectively. It's in principle important to note that this information can depend on which packages are installed, since these may define additional subclasses or superclasses.
特别是,完成填补了向上和向下的继承类的信息,contains和subclasses分别在插槽。这是在重要的原则要注意,这些信息可以取决于安装了哪些软件包,因为这些可以定义额外的子类或超类。
插槽----------Slots----------
slots: A named list of the slots in this class; the elements of the list are the classes to which the slots must belong (or extend), and the names of the list gives the
slots:在这个类的插槽命名列表,列表中的元素的类的插槽必须属于(或延长),名单上的名字给
contains: A named list of the classes this class "contains"; the elements of the list are objects of SClassExtension. The list may be only the direct extensions or all the currently known extensions (see the
contains:一个类,这个类包含命名的列表,列表中的元素是SClassExtension对象。这份名单可能是唯一的直接扩展或目前已知的所有扩展(见
virtual: Logical flag, set to TRUE if this is
virtual:逻辑的标志,设置TRUE如果这是
prototype: The object that represents the standard prototype for this class; i.e., the data and slots returned by a call to new for this class with no special
prototype:对象,它代表了这个类的标准原型;即new这个类通过调用返回的数据和插槽没有特殊
validity: Optionally, a function to be used to test the validity of objects from this class.
validity:(可选),被用来测试对象的有效性,从这个类的功能。
access: Access control information. Not currently used.
access:访问控制信息。目前没有使用。
className: The character string name of the class.
className:类的字符串名称。
package: The character string name of the package to which the class belongs. Nearly always the package on which the metadata for the class is stored, but in operations such as constructing inheritance information, the internal package name
package:字符串类所属的包名。几乎总是类的元数据存储在其上的包,但在操作,如构建遗传信息,内部包名
subclasses: A named list of the classes known to extend this class'; the elements of the list are objects of class SClassExtension. The list is currently only
subclasses:一个被称为扩展这个类,类的命名列表,列表中的元素是对象类SClassExtension。这份名单是目前仅
versionKey: Object of class "externalptr"; eventually will perhaps hold some versioning information, but not
versionKey:"externalptr";最终也许会举行一些版本信息,而不是类的对象
sealed: Object of class "logical"; is this
sealed:Object类的"logical";这是
参见----------See Also----------
See function setClass to supply the information in the class definition. See Classes for a more basic discussion of class information.
见函数setClass在类定义中提供的信息。看到一类的信息更基本的讨论班。
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|