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

Overview

Describes a category.

Tasks

Initialization & disposal

Category data

  •   isExtension Determines whether this category is extension or not. property
  •   nameOfCategory The name of the category or nil if this is an extension. property
  •   nameOfClass The name of the class the category extends. property
  •   idOfCategory The ID of the category composed of class name followed by category name in parenthesis. property
  •   adoptedProtocols Categories adopted protocols, available via GBAdoptedProtocolsProvider. property
  •   methods Categories methods, available via GBMethodsProvider. property

Other Methods

Properties

adoptedProtocols

Categories adopted protocols, available via GBAdoptedProtocolsProvider.

@property (readonly) GBAdoptedProtocolsProvider *adoptedProtocols

Declared In

GBCategoryData.h

idOfCategory

The ID of the category composed of class name followed by category name in parenthesis.

@property (readonly) NSString *idOfCategory

Declared In

GBCategoryData.h

isExtension

Determines whether this category is extension or not.

@property (readonly) BOOL isExtension

Declared In

GBCategoryData.h

methods

Categories methods, available via GBMethodsProvider.

@property (readonly) GBMethodsProvider *methods

Declared In

GBCategoryData.h

nameOfCategory

The name of the category or nil if this is an extension.

@property (readonly) NSString *nameOfCategory

Declared In

GBCategoryData.h

nameOfClass

The name of the class the category extends.

@property (readonly) NSString *nameOfClass

Declared In

GBCategoryData.h

Class Methods

categoryDataWithName:className:

Returns autoreleased instance of the category data with the given data.

+ (id)categoryDataWithName:(NSString *)name className:(NSString *)className

Parameters

name
The name of the category or nil if this is extension.
className
The name of the class the category extends.

Return Value

Returns initialized object.

Exceptions

NSException
Thrown if the given class name is nil or empty.

Declared In

GBCategoryData.h

Instance Methods

initWithName:className:

Initializes the category with the given name.

- (id)initWithName:(NSString *)name className:(NSString *)className

Parameters

name
The name of the category.
className
The name of the class the category extends.

Return Value

Returns initialized object.

Discussion

This is the designated initializer.

Exceptions

NSException
Thrown if the given class name is nil or empty.

Declared In

GBCategoryData.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 -> GBCategoryData.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 -> GBCategoryData.m