Inherits from GBModelBase : NSObject
Conforms to GBObjectDataProviding
Declared in GBClassData.h
GBClassData.m

Overview

Describes a class.

Tasks

Initialization & disposal

Class data

  •   nameOfClass The name of the class. property
  •   nameOfSuperclass The name of the superclass or nil if this is root class. property
  •   superclass Superclass object if known object or nil if nameOfSuperclass is nil or doesn't point to a known class. property
  •   adoptedProtocols Class's adopted protocols, available via GBAdoptedProtocolsProvider. property
  •   ivars Class's ivars, available via GBIvarsProvider. property
  •   methods Class's methods, available via GBMethodsProvider. property

Other Methods

Properties

adoptedProtocols

Class's adopted protocols, available via GBAdoptedProtocolsProvider.

@property (readonly) GBAdoptedProtocolsProvider *adoptedProtocols

Declared In

GBClassData.h

ivars

Class's ivars, available via GBIvarsProvider.

@property (readonly) GBIvarsProvider *ivars

Declared In

GBClassData.h

methods

Class's methods, available via GBMethodsProvider.

@property (readonly) GBMethodsProvider *methods

Declared In

GBClassData.h

nameOfClass

The name of the class.

@property (readonly) NSString *nameOfClass

Declared In

GBClassData.h

nameOfSuperclass

The name of the superclass or nil if this is root class.

@property (copy) NSString *nameOfSuperclass

Declared In

GBClassData.h

superclass

Superclass object if known object or nil if nameOfSuperclass is nil or doesn't point to a known class.

@property (retain) GBClassData *superclass

Declared In

GBClassData.h

Class Methods

classDataWithName:

Returns autoreleased instance of the class data with the given name.

+ (id)classDataWithName:(NSString *)name

Parameters

name
The name of the class.

Return Value

Returns initialized object.

Exceptions

NSException
Thrown if the given name is nil or empty.

Declared In

GBClassData.h

Instance Methods

initWithName:

Initializes the class with the given name.

- (id)initWithName:(NSString *)name

Parameters

name
The name of the class.

Return Value

Returns initialized object.

Discussion

This is the designated initializer.

Exceptions

NSException
Thrown if the given name is nil or empty.

Declared In

GBClassData.h

isTopLevelObject

Specifies whether this is a top level object or not.

- (BOOL)isTopLevelObject

Discussion

Top level objects are classes, categories and protocols.

Declared In

GBModelBase.h@95 -> GBClassData.m

mergeDataFromObject:

Merges all data from the given object.

- (void)mergeDataFromObject:(id)source

Parameters

source
Source object to merge from.

Discussion

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

GBModelBase.h@71 -> GBClassData.m