GBMethodArgument Class Reference
| Inherits from | NSObject |
| Declared in | GBMethodArgument.h GBMethodArgument.m |
Tasks
Initialization & disposal
-
+ methodArgumentWithName:types:var:terminationMacros:Returns autoreleased method argument with the given parameters. -
+ methodArgumentWithName:types:var:Returns autoreleased method argument with the given parameters. -
+ methodArgumentWithName:Returns autoreleased type-less method argument. -
– initWithName:types:var:terminationMacros:Initializes method argument with the given parameters.
Argument data
-
argumentNameThe name of the argument. property -
argumentTypesArray of argument types. property -
argumentVarThe name of the argument variable. property -
terminationMacrosArray of variable arguments termination macros. property -
isTypedSpecifies whether the argument is typed or not. The argument is typed if it uses type and var. property -
isVariableArgSpecifies whether the argument is variable arg or not. property
Properties
argumentName
The name of the argument.
@property (readonly) NSString *argumentNameDiscussion
Argument is part of method selector and defines -(result)arg:(type)var part of method.
Declared In
GBMethodArgument.hargumentTypes
Array of argument types.
@property (readonly) NSArray *argumentTypesDiscussion
Types array define -(result)arg:(type)var part of method. If argument doesn't use types, this is empty array.
Declared In
GBMethodArgument.hargumentVar
The name of the argument variable.
@property (copy) NSString *argumentVarDiscussion
Argument variable defines -(result)arg:(type)var part of method. If argument doesn't use variable, this is nil.
Declared In
GBMethodArgument.hisTyped
Specifies whether the argument is typed or not. The argument is typed if it uses type and var.
@property (readonly) BOOL isTypedDeclared In
GBMethodArgument.hisVariableArg
Specifies whether the argument is variable arg or not.
@property (assign) BOOL isVariableArgDeclared In
GBMethodArgument.hterminationMacros
Array of variable arguments termination macros.
@property (readonly) NSArray *terminationMacrosDiscussion
Termination macros array define -(result)arg:(type)var,...macros part of method. If argument isn't variable or doesn't have termination macros, this is nil.
Declared In
GBMethodArgument.hClass Methods
methodArgumentWithName:
Returns autoreleased type-less method argument.
+ (id)methodArgumentWithName:(NSString *)nameParameters
- name
- The name of the method argument, part of method selector.
Return Value
Returns initialized object or nil if initialization fails.
Discussion
Internally this sends allocated instance initWithName:types:var:terminationMacros: message, so check it's documentation for details.
Exceptions
- NSException
- Thrown if the argument is
nilor empty string.
Declared In
GBMethodArgument.hmethodArgumentWithName:types:var:
Returns autoreleased method argument with the given parameters.
+ (id)methodArgumentWithName:(NSString *)name types:(NSArray *)types var:(NSString *)varParameters
- name
- The name of the method argument, part of method selector.
- types
- Array of argument types in the form of
NSStringinstances ornilif not used.
- var
- Array of arguments in the form of
GBMethodArgumentinstances ornilif not used.
Return Value
Returns initialized object or nil if initialization fails.
Discussion
Internally this sends allocated instance initWithName:types:var:terminationMacros: message, so check it's documentation for details.
Exceptions
- NSException
- Thrown if either of the given parameters is invalid.
Declared In
GBMethodArgument.hmethodArgumentWithName:types:var:terminationMacros:
Returns autoreleased method argument with the given parameters.
+ (id)methodArgumentWithName:(NSString *)name types:(NSArray *)types var:(NSString *)var terminationMacros:(NSArray *)macrosParameters
- name
- The name of the method argument, part of method selector.
- types
- Array of argument types in the form of
NSStringinstances ornilif not used.
- var
- Array of arguments in the form of
GBMethodArgumentinstances ornilif not used.
- macros
- Array of variable arg termination macros or
nilif not variable arg.
Return Value
Returns initialized object or nil if initialization fails.
Discussion
Internally this sends allocated instance initWithName:types:var:terminationMacros: message, so check it's documentation for details.
Exceptions
- NSException
- Thrown if either of the given parameters is invalid.
Declared In
GBMethodArgument.hInstance Methods
initWithName:types:var:terminationMacros:
Initializes method argument with the given parameters.
- (id)initWithName:(NSString *)argument types:(NSArray *)types var:(NSString *)var terminationMacros:(NSArray *)macrosParameters
- argument
- The name of the method argument, part of method selector.
- types
- Array of argument types in the form of
NSStringinstances ornilif not used.
- var
- Array of arguments in the form of
GBMethodArgumentinstances ornilif not used.
- macros
- Array of variable arg termination macros or
nilif not variable arg.
Return Value
Returns initialized object or nil if initialization fails.
Discussion
This is the designated initializer. You can either use it to specify method argument with all parameters, in such case you must supply all parameters, or you can use it to specify method argument without type. In such case you should set types and var to nil. If the argument is variable arg type, you should pass in optional termination macros or empty array if no termination macro is used. To specify standard argument, pass nil for termination macros instead!
Note: If you use the selector for type-less argument, both initializer parameters - types and var must be nil. If only one of these is nil, exception is thrown.
Exceptions
- NSException
- Thrown if either of the given parameters is invalid.
Declared In
GBMethodArgument.h