Fields类
该类用来实现和描述实体(Entity)的字段(Fields)方法。
Fields类的实现存放在路径下文件data/framework/game/fields.h中。
Fields Class
成员
Fields (variable instance)
构造函数。 用来创建Fields类的实例。参数
- variable instance - 指带有字段(fields)方法或用户类名称的用户类的实例。
string getClassName ()
其作用是返回类的名称。返回值
类的名称。string getBaseName ()
其作用是返回父类的名称。返回值
父类的名称。int getNumFields ()
其作用是返回类的字段(fields)的数量。返回值
类的字段(fields)的数量。Field getField (variable index)
其作用是通过类的字段自身的索引(index)返回该字段。参数
- variable index - 该参数可以是字段序号,前提是index为整型;它也可以是字段名称,前提是index为string型。
返回值
类的字段(field)。最新更新: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)