GBModelBase Class Reference
| Inherits from | NSObject |
| Declared in | GBModelBase.h GBModelBase.m |
Tasks
Declared files handling
-
– registerSourceInfo:Registers the givenGBSourceInfotosourceInfoslist. -
– sourceInfosSortedByNameReturns the array of allsourceInfossorted by file name. -
prefferedSourceInfoReturns the preffered source info that should be rendered to output. property -
sourceInfosThe list of all declared file data asGBSourceInfoobjects. property
Comments handling
-
commentThe comment associated with this object ornilif no comment is associated. property
Data handling
-
– mergeDataFromObject:Merges all data from the given object.
Hierarchy handling
-
parentObjectObject's parent object ornilif object has no parent. property -
isTopLevelObjectSpecifies whether this is a top level object or not. property
Output generation helpers
-
htmlLocalReferenceReturns the HTML reference for the object that can be used within the same HTML file. property -
htmlReferenceNameReturns the HTML reference name of the object that can be used as an anchor to link against. property
Properties
comment
The comment associated with this object or nil if no comment is associated.
@property (retain) GBComment *commentDeclared In
GBModelBase.hhtmlLocalReference
Returns the HTML reference for the object that can be used within the same HTML file.
@property (copy) NSString *htmlLocalReferenceDiscussion
This is simply a wrapper over [GBApplicationSettingsProvider 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.
See Also
Declared In
GBModelBase.hhtmlReferenceName
Returns the HTML reference name of the object that can be used as an anchor to link against.
@property (copy) NSString *htmlReferenceNameDiscussion
This is simply a wrapper over [GBApplicationSettingsProvider 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.
See Also
Declared In
GBModelBase.hisTopLevelObject
Specifies whether this is a top level object or not.
@property (readonly) BOOL isTopLevelObjectDiscussion
Top level objects are classes, categories and protocols.
Declared In
GBModelBase.hparentObject
Object's parent object or nil if object has no parent.
@property (retain) id parentObjectDiscussion
This is mostly used for more in-context logging messages.
Declared In
GBModelBase.hprefferedSourceInfo
Returns the preffered source info that should be rendered to output.
@property (readonly) GBSourceInfo *prefferedSourceInfoReturn Value
Returns preffered source information object to be used for output.
Discussion
This investigates sourceInfos list and comment and returns the most likely used one. If comment is given and has source information attached, that one is used. If comment is not given, source information list from the receiver is used. If header file is found in the list, that one is preffered. If header file is not found, the first file is returned.
Declared In
GBModelBase.hInstance Methods
mergeDataFromObject:
Merges all data from the given object.
- (void)mergeDataFromObject:(id)sourceParameters
- 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.hregisterSourceInfo:
Registers the given GBSourceInfo to sourceInfos list.
- (void)registerSourceInfo:(GBSourceInfo *)dataParameters
- data
- Source information data.
Discussion
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
nilor empty.
Declared In
GBModelBase.h