GBSourceInfo Class Reference
| Inherits from | NSObject |
| Declared in | GBSourceInfo.h GBSourceInfo.m |
Overview
Specifies declared file data for store object.
Declared file provides information about where an object was declared - i.e. source file name and line number. This can be used for generating output and for diagnostics and as debug information.
Tasks
Initialization & disposal
-
+ infoWithFilename:lineNumber:Returns a new autoreleasedGBSourceInfowith the given values.
Data handling
-
– compare:Returns anNSComparisonResultvalue that indicates whether the receiver is greater than, equal to, or less than a given data. -
filenameThe name of the file, without path. property -
lineNumberThe number of the line within the file. property
Properties
filename
The name of the file, without path.
@property (readonly, copy) NSString *filenameSee Also
Declared In
GBSourceInfo.hClass Methods
infoWithFilename:lineNumber:
Returns a new autoreleased GBSourceInfo with the given values.
+ (id)infoWithFilename:(NSString *)filename lineNumber:(NSUInteger)lineNumberParameters
- filename
- The name of the file without path.
- lineNumber
- Line number within the file.
Return Value
Returns autoreleased object.
Exceptions
- NSException
- Thrown if the given filename is
nilor empty string.
Declared In
GBSourceInfo.hInstance Methods
compare:
Returns an NSComparisonResult value that indicates whether the receiver is greater than, equal to, or less than a given data.
- (NSComparisonResult)compare:(GBSourceInfo *)dataParameters
- data
GBSourceInfoto compare with.
Return Value
NSOrderedAscending if the value of data is greater than the receiver, NSOrderedSame if they’re equal, and NSOrderedDescending if the data is less than the receiver.
Discussion
Comparison is done over the filename first. If the filename is the same, lineNumber is compared.
Important: Note that the given data must not be nil. The behavior is undefined in such case!
Declared In
GBSourceInfo.h