1995-03-23 03:42:04 +00:00
|
|
|
/* Interface for NSMethodSignature for GNUStep
|
1998-08-13 20:41:28 +00:00
|
|
|
Copyright (C) 1995, 1998 Free Software Foundation, Inc.
|
1995-07-01 19:01:11 +00:00
|
|
|
|
1996-04-17 20:17:45 +00:00
|
|
|
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
1995-07-01 19:01:11 +00:00
|
|
|
Date: 1995
|
1998-08-13 20:41:28 +00:00
|
|
|
Rewritten: Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
|
|
|
Date: 1998
|
1995-03-23 03:42:04 +00:00
|
|
|
|
1996-05-12 00:56:10 +00:00
|
|
|
This file is part of the GNUstep Base Library.
|
1995-03-23 03:42:04 +00:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
1999-09-09 02:56:20 +00:00
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
1995-03-23 03:42:04 +00:00
|
|
|
*/
|
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#ifndef __NSMethodSignature_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSMethodSignature_h_GNUSTEP_BASE_INCLUDE
|
1994-11-08 16:44:01 +00:00
|
|
|
|
1995-04-17 21:13:20 +00:00
|
|
|
#include <Foundation/NSObject.h>
|
1994-11-08 16:44:01 +00:00
|
|
|
|
1998-11-02 10:55:53 +00:00
|
|
|
#ifndef STRICT_MACOS_X
|
1998-08-13 20:41:28 +00:00
|
|
|
/*
|
|
|
|
* Info about layout of arguments.
|
|
|
|
* Extended from the original OpenStep version to let us know if the
|
|
|
|
* arg is passed in registers or on the stack.
|
|
|
|
*
|
|
|
|
* NB. This no longer exists in Rhapsody/MacOS.
|
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
int offset;
|
|
|
|
unsigned size;
|
|
|
|
const char *type;
|
1998-11-02 10:55:53 +00:00
|
|
|
#ifndef NO_GNUSTEP
|
1998-08-13 20:41:28 +00:00
|
|
|
unsigned align;
|
|
|
|
unsigned qual;
|
|
|
|
BOOL isReg;
|
1998-11-02 10:55:53 +00:00
|
|
|
#endif
|
1995-11-06 17:35:50 +00:00
|
|
|
} NSArgumentInfo;
|
1998-11-02 10:55:53 +00:00
|
|
|
#endif
|
1995-11-06 17:35:50 +00:00
|
|
|
|
1994-11-08 16:44:01 +00:00
|
|
|
@interface NSMethodSignature : NSObject
|
|
|
|
{
|
1999-09-16 07:21:34 +00:00
|
|
|
const char *_methodTypes;
|
|
|
|
unsigned _argFrameLength;
|
|
|
|
unsigned _numArgs;
|
1998-11-02 10:55:53 +00:00
|
|
|
#ifdef STRICT_MACOS_X
|
1999-09-16 07:21:34 +00:00
|
|
|
void *_dummy;
|
1998-11-02 10:55:53 +00:00
|
|
|
#else
|
1999-09-16 07:21:34 +00:00
|
|
|
NSArgumentInfo *_info;
|
1998-11-02 10:55:53 +00:00
|
|
|
#endif
|
1994-11-08 16:44:01 +00:00
|
|
|
}
|
|
|
|
|
2001-12-17 14:31:42 +00:00
|
|
|
+ (NSMethodSignature*) signatureWithObjCTypes: (const char*)t;
|
1994-11-08 16:44:01 +00:00
|
|
|
|
1998-11-02 10:55:53 +00:00
|
|
|
#ifndef STRICT_MACOS_X
|
1995-11-06 17:35:50 +00:00
|
|
|
- (NSArgumentInfo) argumentInfoAtIndex: (unsigned)index;
|
1998-11-02 10:55:53 +00:00
|
|
|
#endif
|
1994-11-08 16:44:01 +00:00
|
|
|
- (unsigned) frameLength;
|
1998-08-13 20:41:28 +00:00
|
|
|
- (const char*) getArgumentTypeAtIndex: (unsigned)index;
|
1994-11-08 16:44:01 +00:00
|
|
|
- (BOOL) isOneway;
|
|
|
|
- (unsigned) methodReturnLength;
|
1998-08-13 20:41:28 +00:00
|
|
|
- (const char*) methodReturnType;
|
1994-11-08 16:44:01 +00:00
|
|
|
- (unsigned) numberOfArguments;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
1998-11-02 10:55:53 +00:00
|
|
|
#ifndef NO_GNUSTEP
|
|
|
|
@interface NSMethodSignature(GNUstep)
|
1998-08-13 20:41:28 +00:00
|
|
|
- (NSArgumentInfo*) methodInfo;
|
|
|
|
- (const char*) methodType;
|
1998-01-26 14:18:18 +00:00
|
|
|
@end
|
1998-11-02 10:55:53 +00:00
|
|
|
#endif
|
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#endif /* __NSMethodSignature_h_GNUSTEP_BASE_INCLUDE */
|