Function 関数

class_copyProtocolList(_:_:)

Describes the protocols adopted by a class. あるクラスによって採用されたプロトコルそれらを記述します。

Declaration 宣言

func class_copyProtocolList(_ cls: AnyClass?, 
                          _ outCount: UnsafeMutablePointer<UInt32>?) -> AutoreleasingUnsafeMutablePointer<Protocol>?

Parameters パラメータ

cls

The class you want 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 Protocol* describing the protocols adopted by the class. Any protocols adopted by superclasses or other protocols are not included. The array contains *outCount pointers followed by a NULL terminator. You must free the array with free().

If cls adopts no protocols, or cls is Nil, returns NULL and *outCount is 0.

See Also 参照

Working with Classes クラスを扱う