Function 関数

class_copyIvarList(_:_:)

Describes the instance variables declared by a class. あるクラスによって宣言されたインスタンス変数を記述します。

Declaration 宣言

func class_copyIvarList(_ cls: AnyClass?, 
                      _ outCount: UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<Ivar>?

Parameters パラメータ

cls

The class to inspect. 調査するクラス。

outCount

On return, contains the length of the returned array. 戻りでは、返された配列の長さを含みます。 If outCount is NULL, the length is not returned.

Return Value 戻り値

An array of pointers of type Ivar describing the instance variables declared by the class. Any instance variables declared by superclasses are not included. The array contains *outCount pointers followed by a NULL terminator. You must free the array with free().

If the class declares no instance variables, or cls is Nil, NULL is returned and *outCount is 0.

See Also 参照

Working with Classes クラスを扱う