Yes, Class
is a struct
that contains all the info needed for that particular class. It is how you can implement an object-oriented paradigm in an environment, like C, that does not allow it by default.
I would suggest you to give a look to Object-Oriented Programming with ANSI C (PDF), it explains in a well complex way how you can implement objective-oriented in C.
Usually that Class
struct will contains things like:
Class super_class
const char *name
long version
long info
long instance_size
struct objc_ivar_list *ivars
struct objc_method_list **methodLists
struct objc_cache *cache
struct objc_protocol_list *protocols
I'm referencing to ObjectiveC itself (this is in /usr/include/objc/runtime.h
). This is how a class was defined UNTIL ObjC 2.0. It is just to give you the idea..
This struct is needed to allow RTTI, dynamic invokation and inheritance, otherwise you won't need to know which object you are using at runtime (having a pointer to its Class
definition).
Remember that ObjC is a superset of C, so every feature it has exploits C by building complex OOP over it..