This is NSMethodSignature.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s4 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSMethodSignature pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject fs20 fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSObject (NSObject) fs20 fs28 s7 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSMethodSignature.h fs20 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 NSMethodSignature provides the programmatic interface to objects that provide access to the 'aatype signatures'ba of an object'27s methods'd0that is, the types of the arguments and return value. A i method signature i0 is used by the distributed objects machinery to determine how to correctly encode method names and arguments for the underlying inter-process communications. The typical use of method signatures is when a message is sent to a remote object i viai0 a proxy. If the proxy doesn'27t know the types of arguments a remote object will use, the proxy first has to query the remote object for its method signature object, which specifies the types the method requires as arguments. The proxy then knows how to encode the data it has been passed and forward it correctly to the real object. fs16 fs28 You create a method signature object by sending a b signatureWithObjCTypesb0 method to the NSMethodSignature class object, passing a 'aaC'ba-style character string which specifies the method'27s return types and argument types. fs16 fs28 Given a method signature, all other available instance methods query the object for information about the signature, such as its return type, number of arguments, stack frame size (obviously architecture-dependent), and so on. fs16 fs28 Also see NSInvocation for the class which can use method signature objects to send messages to other objects. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Creating a Method Signature fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 + (NSMethodSignature *)b signatureWithObjCTypes:b0 (const char *)i types s9 li7030 fi-6553 fi-5796 i0 tab Creates a method signature object given i typesi0 , a string encoding the method return and argument types. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Querying a Method Signature fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSArgumentInfo)b argumentInfoAtIndex:b0 (unsigned)i index s9 li7030 fi-6553 fi-5796 i0 tab Returns information about the argument at i indexi0 . Indices begin with 0. The 'aahidden'ba arguments b selfb0 and b _cmdb0 are indexed at 0 and 1; method-specific arguments begin at index 2. If i indexi0 is too large for the actual number of arguments, NSInvalidArgumentException is raised. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (unsigned)b frameLengthb0 tab Returns the number of bytes that the arguments, taken together, would occupy on the stack. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isOnewayb0 tab Returns YES if the method is asynchronous (that is, it returns without waiting for the receiver to finish processing it), and NO otherwise. fi-6552 fs16 fs28 fi-6552 {f3 -} (unsigned)b methodReturnLengthb0 tab Returns the number of bytes required by the return value. fi-6552 fs16 fs28 fi-6552 {f3 -} (char *)b methodReturnTypeb0 tab Returns a string encoding the return type of the method. (What the characters in the string represent is usually defined by some implementation-dependent runtime types.) fi-6552 fs16 fs28 fi-6552 {f3 -} (unsigned)b numberOfArgumentsb0 tab Returns the number of arguments recorded in the receiver. This will be at least two, since it includes the 'aahidden'ba arguments, b selfb0 and b _cmdb0 , which are the first two arguments passed to every method implementation. }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.