Up

NSMethodSignature class reference

Authors

Andrew Kachites McCallum (mccallum@gnu.ai.mit.edu)

Version: 26606

Date: 2008-06-08 11:38:33 +0100 (Sun, 08 Jun 2008)

Copyright: (C) 1994, 1995, 1996, 1998 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSMethodSignature class
  2. Software documentation for the NSMethodSignature(GNUstep) category

Software documentation for the NSMethodSignature class

NSMethodSignature : NSObject

Declared in:
Foundation/NSMethodSignature.h
Availability: OpenStep

Class encapsulating type information for method arguments and return value. It is used as a component of NSInvocation to implement message forwarding, such as within the distributed objects framework. Instances can be obtained from the NSObject method [NSObject -methodSignatureForSelector:] .

Basically, types are represented as Objective-C @encode(...) compatible strings, together with size information. The arguments are numbered starting from 0, including the implicit arguments self (type id, at position 0) and _cmd (type SEL, at position 1).


Instance Variables

Method summary

signatureWithObjCTypes: 

+ (NSMethodSignature*) signatureWithObjCTypes: (const char*)t;
Availability: OpenStep

Build a method signature directly from string description of return type and argument types, using the Objective-C @encode(...) type codes.

argumentInfoAtIndex: 

- (NSArgumentInfo) argumentInfoAtIndex: (unsigned)index;
Availability: OPENSTEP 4.0.0 removed at MacOS-X 10.0.0

Returns full information on given argument. Indices start at 0. Provide -1 to get info on return value.

frameLength 

- (unsigned) frameLength;
Availability: OpenStep

Number of bytes that the full set of arguments occupies on the stack, which is platform(hardware)-dependent.

getArgumentTypeAtIndex: 

- (const char*) getArgumentTypeAtIndex: (unsigned)index;
Availability: OpenStep

Returns Objective-C @encode(...) compatible string. Arguments are numbered starting from 0, including the implicit arguments self (type id, at position 0) and _cmd (type SEL, at position 1).

isOneway 

- (BOOL) isOneway;
Availability: OpenStep

Pertains to distributed objects; method is asynchronous when invoked and return should not be waited for.

methodReturnLength 

- (unsigned) methodReturnLength;
Availability: OpenStep

Number of bytes that the return value occupies on the stack, which is platform(hardware)-dependent.

methodReturnType 

- (const char*) methodReturnType;
Availability: OpenStep

Returns Objective-C @encode(...) compatible string. Arguments are numbered starting from 0, including the implicit arguments self (type id, at position 0) and _cmd (type SEL, at position 1).

numberOfArguments 

- (unsigned) numberOfArguments;
Availability: OpenStep

Returns number of arguments to method, including the implicit self and _cmd.



Instance Variables for NSMethodSignature Class

_argFrameLength

@protected unsigned int _argFrameLength;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_info

@protected void* _info;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_methodTypes

@protected const char* _methodTypes;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_numArgs

@protected unsigned int _numArgs;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.




Software documentation for the NSMethodSignature(GNUstep) category

NSMethodSignature(GNUstep)

Declared in:
Foundation/NSMethodSignature.h
Availability: Base
Likely to be changed/moved/removed at 1.17.0

Declares a convenience method for getting the entire array of raw type and size information.
Method summary

methodInfo 

- (NSArgumentInfo*) methodInfo;
Availability: Base
Likely to be changed/moved/removed at 1.17.0

Convenience method for getting the entire array of raw type and size information.

methodType 

- (const char*) methodType;
Availability: Base
Likely to be changed/moved/removed at 1.17.0

Returns a string containing all Objective-C @encode(...) compatible type information.


Up