GBSourceInfo Class Reference

Inherits from NSObject
Declared in GBSourceInfo.h<br />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

Data handling

Other Methods

Class Methods

infoWithFilename:lineNumber:

Returns a new autoreleased GBSourceInfo with the given values.

+ (id)infoWithFilename:(NSString *)filename lineNumber:(NSUInteger)lineNumber

Parameters

filename
The name of the file without path.
lineNumber
Line number within the file.

Return Value

Returns autoreleased object.

Discussion

Returns a new autoreleased GBSourceInfo with the given values.

Exceptions

NSException
Thrown if the given filename is nil or empty string.

Declared In

GBSourceInfo.h
GBSourceInfo.m

Instance 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 *)data

Parameters

data
GBSourceInfo to 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

Returns an NSComparisonResult value that indicates whether the receiver is greater than, equal to, or less than a given data .

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
GBSourceInfo.m

debugDescription

description

Properties

filename

The name of the file, without path.

@property (readonly, copy) NSString *filename

Discussion

The name of the file, without path.

See Also

Declared In

GBSourceInfo.h

lineNumber

The number of the line within the file.

@property (readonly, assign) NSUInteger lineNumber

Discussion

The number of the line within the file.

See Also

Declared In

GBSourceInfo.h