GBModelBase Class Reference

Inherits from NSObject
Declared in GBModelBase.h<br />GBModelBase.m

Overview

Provides common functionality for model objects.

Tasks

Declared files handling

Comments handling

Data handling

Hierarchy handling

Output generation helpers

Other Methods

Instance Methods

init

mergeDataFromObject:

Merges all data from the given object.

- (void)mergeDataFromObject:(id)source

Parameters

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

GBModelBase.h
GBModelBase.m

registerSourceInfo:

Registers the given GBSourceInfo to sourceInfos list.

- (void)registerSourceInfo:(GBSourceInfo *)data

Parameters

data
Source information data.

Discussion

Registers the given GBSourceInfo to sourceInfos list.

If file data with the same filename already exists in the set, it is replaced with the given one.

Exceptions

NSException
Thrown if the given filename is nil or empty.

Declared In

GBModelBase.h
GBModelBase.m

sourceInfosSortedByName

Returns the array of all sourceInfos sorted by file name.

- (NSArray *)sourceInfosSortedByName

Discussion

Returns the array of all sourceInfos sorted by file name.

Declared In

GBModelBase.h
GBModelBase.m

Properties

comment

The comment associated with this object or nil if no comment is associated.

@property (retain) GBComment *comment

Discussion

The comment associated with this object or nil if no comment is associated.

Declared In

GBModelBase.h

htmlLocalReference

Returns the HTML reference for the object that can be used within the same HTML file.

@property (copy) NSString *htmlLocalReference

Discussion

Returns the HTML reference for the object that can be used within the same HTML file.

This is simply a wrapper over [GBApplicationSettingsProviding htmlReferenceForObject:fromSource:] , passing the given object as both method arguments. The major reason for introducing this method is the ability to reference it from the output templates! In this way all knowledge about references is handled in a single point and doesn't have to be repeated in various places.

Declared In

GBModelBase.h

htmlReferenceName

Returns the HTML reference name of the object that can be used as an anchor to link against.

@property (copy) NSString *htmlReferenceName

Discussion

Returns the HTML reference name of the object that can be used as an anchor to link against.

This is simply a wrapper over [GBApplicationSettingsProviding htmlReferenceNameForObject:] , passing the given object as the method argument. The major reason for introducing this method is the ability to reference it from the output templates! In this way all knowledge about references is handled in a single point and doesn't have to be repeated in various places.

Declared In

GBModelBase.h

parentObject

Object's parent object or nil if object has no parent.

@property (retain) id parentObject

Discussion

Object's parent object or nil if object has no parent.

This is mostly used for more in-context logging messages.

Declared In

GBModelBase.h

sourceInfos

The list of all declared file data as GBSourceInfo objects.

@property (readonly) NSSet *sourceInfos

Discussion

The list of all declared file data as GBSourceInfo objects.

Declared In

GBModelBase.h