| Inherits from | NSObject |
| Declared in | GBModelBase.h<br />GBModelBase.m |
Provides common functionality for model objects.
- registerSourceInfo:
Registers the given GBSourceInfo to sourceInfos list.
- sourceInfosSortedByName
Returns the array of all sourceInfos sorted by file name.
sourceInfos
The list of all declared file data as GBSourceInfo objects.
- mergeDataFromObject:
Merges all data from the given object.
parentObject
Object's parent object or nil if object has no parent.
htmlLocalReference
Returns the HTML reference for the object that can be used within the same HTML file.
htmlReferenceName
Returns the HTML reference name of the object that can be used as an anchor to link against.
Merges all data from the given object.
- (void)mergeDataFromObject:(id)sourceMerges 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...
}
GBModelBase.hGBModelBase.m Registers the given GBSourceInfo to sourceInfos list.
- (void)registerSourceInfo:(GBSourceInfo *)data 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.
nil or empty. GBModelBase.hGBModelBase.m Returns the array of all sourceInfos sorted by file name.
- (NSArray *)sourceInfosSortedByName Returns the array of all sourceInfos sorted by file name.
GBModelBase.hGBModelBase.mReturns the HTML reference for the object that can be used within the same HTML file.
@property (copy) NSString *htmlLocalReferenceReturns 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.
GBModelBase.hReturns the HTML reference name of the object that can be used as an anchor to link against.
@property (copy) NSString *htmlReferenceNameReturns 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.
GBModelBase.h Object's parent object or nil if object has no parent.
@property (retain) id parentObject Object's parent object or nil if object has no parent.
This is mostly used for more in-context logging messages.
GBModelBase.h The list of all declared file data as GBSourceInfo objects.
@property (readonly) NSSet *sourceInfos The list of all declared file data as GBSourceInfo objects.
GBModelBase.h