Inherits from NSObject
Declared in GBGenerator.h
GBGenerator.m

Overview

Handles generating of parsed and processed data from any given GBStore.

Generating phase is where output is generated from parsed and processed data - in other words, this is where the work previous phases has done becomes visible and therefore usable for the users. As such, this class is the engine for generating output, but doesn't do actual generation itself. Instead, it serves as an single and simple entry point for the rest of the application. Internally it delegates actual generation tasks to various lower-level objects, based on user's choices.

Tasks

Initialization & disposal

Generation handling

Class Methods

generatorWithSettingsProvider:

Returns autoreleased generator that work with the given GBApplicationSettingsProvider implementor.

+ (id)generatorWithSettingsProvider:(id)settingsProvider

Parameters

settingsProvider
Application-wide settings provider to use for checking parameters.

Return Value

Returns initialized instance or nil if initialization fails.

Exceptions

NSException
Thrown if the given application is nil.

Declared In

GBGenerator.h

Instance Methods

generateOutputFromStore:

Generates all required output from objects registered within the given store.

- (void)generateOutputFromStore:(id)store

Parameters

store
The store that contains all parsed and processed objects.

Discussion

This is the main generating method. It is intended to be invoked from the top level application code. It accepts a GBStore with parsed and processed objects and generates output for all registered objects. All object's and their data is recursively descended so every object that needs to be generated is handled properly!

If any kind of inconsistency is detected in the store, a warning is logged and processing continues. This allows us to generate as much information as possible, while ignoring problems.

Exceptions

NSException
Thrown if a serious problem is detected which prevents us from processing.

Declared In

GBGenerator.h

initWithSettingsProvider:

Initializes the generator to work with the given GBApplicationSettingsProvider implementor.

- (id)initWithSettingsProvider:(id)settingsProvider

Parameters

settingsProvider
Application-wide settings provider to use for checking parameters.

Return Value

Returns initialized instance or nil if initialization fails.

Discussion

This is the designated initializer.

Exceptions

NSException
Thrown if the given application is nil.

Declared In

GBGenerator.h