Inherits from NSObject
Declared in GBMethodSectionData.h
GBMethodSectionData.m

Overview

Definition of a method section.

Method section contains a list of related methods and is used for grouping different groups of methods in the final output. This is only a thin wrapper over an NSArray so it doesn't provide must of validation code found in other classes. It simply defines accessors and mutators for changing the values.

Tasks

Section data handling

Properties

methods

The array of section methods in the order of registration.

@property (readonly) NSArray *methods

Discussion

Each entry is an instance of GBMethodData and should be registered through registerMethod: method.

Declared In

GBMethodSectionData.h

sectionName

The name of the section.

@property (copy) NSString *sectionName

Declared In

GBMethodSectionData.h

Instance Methods

registerMethod:

Registers the given method to the end of the section's methods list.

- (void)registerMethod:(GBMethodData *)method

Parameters

method
The method to register.

Discussion

As GBMethodSectionData is a thin wrapper over an NSArray, no validation is done, the given object is simply added to the end of the methods array. Client should make sure there is no duplication and implement other constraints. If the array is nil, a new instance is created before adding.

Exceptions

NSException
Thrown if the given method is nil.

Declared In

GBMethodSectionData.h

unregisterMethod:

Unregisters the given method from the section's methods list.

- (BOOL)unregisterMethod:(GBMethodData *)method

Parameters

method
The method to remove.

Return Value

Returns YES if the method was found in the list (and was consequently deleted), NO otherwise.

Discussion

If the method isn't part of the section, nothing happens.

Declared In

GBMethodSectionData.h