GBClassData Class Reference
| Inherits from | GBModelBase : NSObject |
| Conforms to | GBObjectDataProviding |
| Declared in | GBClassData.h GBClassData.m |
Overview
Describes a class.
Tasks
Initialization & disposal
-
+ classDataWithName:Returns autoreleased instance of the class data with the given name. -
- initWithName:Initializes the class with the given name.
Class data
-
nameOfClassThe name of the class. -
nameOfSuperclassThe name of the superclass ornilif this is root class. -
superclassSuperclass object if known object ornilifnameOfSuperclassisnilor doesn't point to a known class. -
adoptedProtocolsClass's adopted protocols, available viaGBAdoptedProtocolsProvider. -
ivarsClass's ivars, available viaGBIvarsProvider. -
methodsClass's methods, available viaGBMethodsProvider.
Other Methods
-
- mergeDataFromObject:Merges all data from the given object. -
- isTopLevelObjectSpecifies whether this is a top level object or not.
Class Methods
Instance Methods
initWithName:
Initializes the class with the given name.
- (id)initWithName:(NSString *)nameParameters
- name
- The name of the class.
Return Value
Returns initialized object.
Discussion
Initializes the class with the given name.
This is the designated initializer.
Exceptions
- NSException
- Thrown if the given name is
nilor empty.
Declared In
GBClassData.hisTopLevelObject
Specifies whether this is a top level object or not.
- (BOOL)isTopLevelObjectDiscussion
Specifies whether this is a top level object or not.
Top level objects are classes, categories and protocols.
Declared In
GBClassData.mmergeDataFromObject:
Merges all data from the given object.
- (void)mergeDataFromObject:(id)sourceParameters
- source
- Source object to merge from.
Discussion
Merges all data from the given object.
Source object is left unchanged. If the same object is passed in, nothing happens. Subclasses should override and add their own specifics, however they should send super object the message as well! Here's overriden method example:
- (void)mergeDataFromObject:(GBModelBase *)source {
// source data validation here...
[super mergeDataFromObject:source];
// merge custom data here...
}
Declared In
GBClassData.mProperties
adoptedProtocols
Class's adopted protocols, available via GBAdoptedProtocolsProvider .
@property (readonly) GBAdoptedProtocolsProvider *adoptedProtocolsDeclared In
GBClassData.hivars
Class's ivars, available via GBIvarsProvider .
@property (readonly) GBIvarsProvider *ivarsDeclared In
GBClassData.hmethods
Class's methods, available via GBMethodsProvider .
@property (readonly) GBMethodsProvider *methodsDeclared In
GBClassData.hnameOfClass
The name of the class.
@property (readonly) NSString *nameOfClassDeclared In
GBClassData.hnameOfSuperclass
The name of the superclass or nil if this is root class.
@property (copy) NSString *nameOfSuperclassDeclared In
GBClassData.hsuperclass
Superclass object if known object or nil if nameOfSuperclass is nil or doesn't point to a known class.
@property (retain) GBClassData *superclassDeclared In
GBClassData.h