1
/** Interface for behaviors for Obj-C, "for Protocols with implementations".
2
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
4
Written by: Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
7
This file is part of the GNUstep Base Library.
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Lesser General Public
11
License as published by the Free Software Foundation; either
12
version 2 of the License, or (at your option) any later version.
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Library General Public License for more details.
19
You should have received a copy of the GNU Lesser General Public
20
License along with this library; if not, write to the Free
21
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24
AutogsdocSource: Additions/behavior.m
28
#ifndef __behavior_h_GNUSTEP_BASE_INCLUDE
29
#define __behavior_h_GNUSTEP_BASE_INCLUDE
30
#include <GNUstepBase/GSVersionMacros.h>
32
#include <GNUstepBase/GSObjCRuntime.h>
34
#if defined(__cplusplus)
38
#if OS_API_VERSION(GS_API_NONE,GS_API_LATEST)
40
/* Call this method from CLASS's +initialize method to add a behavior
41
to CLASS. A "behavior" is like a protocol with an implementation.
43
This functions adds to CLASS all the instance and factory methods
44
of BEHAVIOR as well as the instance and factory methods of
45
BEHAVIOR's superclasses (We stop adding super classes as soon as we
46
encounter a common ancestor.) CLASS and BEHAVIOR should share the
47
same instance variable layout.
49
We do not yet deal with Protocols; perhaps we should.
51
The semantics of this stuff is pretty fragile. I don't recommend
52
that you use it in code you write. It might go away completely in
57
GS_EXPORT void behavior_class_add_class (Class class,
59
GS_EXPORT void behavior_class_add_category (Class class,
60
struct objc_category *category);
61
GS_EXPORT void behavior_class_add_methods (Class class,
62
struct objc_method_list *methods);
64
/* Set to non-zero if you want debugging messages on stderr. */
65
GS_EXPORT void behavior_set_debug(int i);
67
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
69
#if defined(__cplusplus)
73
#endif /* __behavior_h_GNUSTEP_BASE_INCLUDE */