2002-11-19 05:37:42 +00:00
|
|
|
/** Interface for behaviors for Obj-C, "for Protocols with implementations".
|
1996-03-31 22:46:59 +00:00
|
|
|
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
1995-03-24 21:50:00 +00:00
|
|
|
|
1996-04-17 20:17:45 +00:00
|
|
|
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
|
1995-03-24 21:50:00 +00:00
|
|
|
Date: March 1995
|
|
|
|
|
1996-05-12 00:56:10 +00:00
|
|
|
This file is part of the GNUstep Base Library.
|
1995-03-24 21:50:00 +00:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-09-14 11:36:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1995-03-24 21:50:00 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-08 10:38:33 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
1995-03-24 21:50:00 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2007-09-14 11:36:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1995-03-24 21:50:00 +00:00
|
|
|
License along with this library; if not, write to the Free
|
2006-09-13 10:20:49 +00:00
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02111 USA.
|
2002-11-19 05:37:42 +00:00
|
|
|
|
|
|
|
AutogsdocSource: Additions/behavior.m
|
|
|
|
|
1995-03-24 21:50:00 +00:00
|
|
|
*/
|
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#ifndef __behavior_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __behavior_h_GNUSTEP_BASE_INCLUDE
|
2006-10-31 07:05:46 +00:00
|
|
|
#include <GNUstepBase/GSVersionMacros.h>
|
1995-03-24 21:50:00 +00:00
|
|
|
|
2003-09-06 03:34:54 +00:00
|
|
|
#include <GNUstepBase/GSObjCRuntime.h>
|
1997-12-11 19:09:56 +00:00
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2007-04-01 04:31:04 +00:00
|
|
|
#if OS_API_VERSION(GS_API_NONE,GS_API_LATEST)
|
2006-10-09 18:32:11 +00:00
|
|
|
|
1995-03-24 21:50:00 +00:00
|
|
|
/* Call this method from CLASS's +initialize method to add a behavior
|
|
|
|
to CLASS. A "behavior" is like a protocol with an implementation.
|
|
|
|
|
|
|
|
This functions adds to CLASS all the instance and factory methods
|
|
|
|
of BEHAVIOR as well as the instance and factory methods of
|
|
|
|
BEHAVIOR's superclasses (We stop adding super classes as soon as we
|
|
|
|
encounter a common ancestor.) CLASS and BEHAVIOR should share the
|
|
|
|
same instance variable layout.
|
|
|
|
|
1995-04-05 00:11:36 +00:00
|
|
|
We do not yet deal with Protocols; perhaps we should.
|
|
|
|
|
|
|
|
The semantics of this stuff is pretty fragile. I don't recommend
|
|
|
|
that you use it in code you write. It might go away completely in
|
|
|
|
future.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2003-09-06 03:34:54 +00:00
|
|
|
GS_EXPORT void behavior_class_add_class (Class class,
|
1996-03-31 22:46:59 +00:00
|
|
|
Class behavior);
|
2003-09-06 03:34:54 +00:00
|
|
|
GS_EXPORT void behavior_class_add_category (Class class,
|
1996-03-31 22:46:59 +00:00
|
|
|
struct objc_category *category);
|
2003-09-06 03:34:54 +00:00
|
|
|
GS_EXPORT void behavior_class_add_methods (Class class,
|
1996-03-31 22:46:59 +00:00
|
|
|
struct objc_method_list *methods);
|
1995-03-24 21:50:00 +00:00
|
|
|
|
|
|
|
/* Set to non-zero if you want debugging messages on stderr. */
|
2003-09-06 03:34:54 +00:00
|
|
|
GS_EXPORT void behavior_set_debug(int i);
|
1995-03-24 21:50:00 +00:00
|
|
|
|
2006-10-09 18:32:11 +00:00
|
|
|
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
|
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#endif /* __behavior_h_GNUSTEP_BASE_INCLUDE */
|