Re: @class
Re: @class
- Subject: Re: @class
- From: Frederick Cheung <email@hidden>
- Date: Fri, 9 Dec 2005 09:57:31 +0000
It's for forward declaring classes. @class NSFoo; basically tells the
compiler "there is an (obj-c) class NSFoo, you haven't see the
declaration for it yet but don't worry it's coming later" so that the
compiler won't barf if (for example) you have an instance variable of
type NSFoo*.
You can use it to avoid having to #import the header file that defines
the class into a header (often you would use this to avoid having
circular dependencies (ie A.h imports B.h and B.h imports A.h)
Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >@class (From: Andrea Salomoni <email@hidden>) |