forked from tomaz/appledoc
/
GBCommentArgument.h
61 lines (45 loc) · 2.22 KB
/
GBCommentArgument.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// GBCommentArgument.h
// appledoc
//
// Created by Tomaz Kragelj on 16.2.11.
// Copyright 2011 Gentle Bytes. All rights reserved.
//
#import <Foundation/Foundation.h>
@class GBCommentComponentsList;
@class GBSourceInfo;
/** Handles individual `GBComment` named argument.
A comment argument is either a parameter or exception. In any case, the class allows assigning argument name and description. The description is simply a list of comment components in the form of `GBCommentComponentsList`. This allows every parameter contain arbitrary descriptions!
*/
@interface GBCommentArgument : NSObject
///---------------------------------------------------------------------------------------
/// @name Initialization & disposal
///---------------------------------------------------------------------------------------
/** Returns a new autoreleased instance of the object with the given string value.
This is a helper initializer which allows setting name with a single message. Sending this message is equivalent to sending `argumentWithName:sourceInfo:`, passing the given _value_ and `nil` for source info.
@param name Name of the argument.
@return Returns initialized object or `nil` if initialization fails.
@see argumentWithName:sourceInfo:
*/
+ (id)argumentWithName:(NSString *)name;
/** Returns a new autoreleased instance of the comment with the given string value and source info.
This is a helper initializer which allows setting default values with a single message.
@param name Name of the argument.
@param info Source info to set.
@return Returns initialized object or `nil` if initialization fails.
@see argumentWithName:
*/
+ (id)argumentWithName:(NSString *)name sourceInfo:(GBSourceInfo *)info;
///---------------------------------------------------------------------------------------
/// @name Argument description
///---------------------------------------------------------------------------------------
/** The name of the argument.
*/
@property (copy) NSString *argumentName;
/** The description components of the argument as `GBCommentComponentsList`.
*/
@property (retain) GBCommentComponentsList *argumentDescription;
/** Source file information.
*/
@property (retain) GBSourceInfo *sourceInfo;
@end