discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of class methods, how?


From: Pierre-Yves Rivaille
Subject: Re: List of class methods, how?
Date: Fri, 22 Jun 2001 13:16:39 +0200 (MET DST)

> Could somebody tell me how to access the list of class methods (as
> opposed to instance methods) from GNUstep/Objc. Right now I use
> 
> Class myclass;
> class->methods 
> 
> to access the list of methods but it looks like this list is only for
> instance methods. I was not able to find an equivalent "class_methods"
> field in the Class structure (I looked at
> ./dev-apps.cvs/libobjc/objc/objc.h). 

class->class_pointer
will give you a pointer to a Class (or MetaClass) object which is the
meta class of the considered class, so this metaclass contains the class
methods you are looking for.

If you look into objc-api, you'll get access to a function which
encapsulates this :
class_get_meta_class : basically returns classs->class_pointer

unfortunately, those functions are not compatible between MOSX/OS4.2 & gcc
runtimes.

Pierre-Yves




reply via email to

[Prev in Thread] Current Thread [Next in Thread]