~ubuntu-branches/ubuntu/trusty/gnustep-base/trusty

« back to all changes in this revision

Viewing changes to Headers/Additions/GNUstepBase/behavior.h

Tags: upstream-1.20.0
ImportĀ upstreamĀ versionĀ 1.20.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/** Interface for behaviors for Obj-C, "for Protocols with implementations".
2
 
   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
3
 
 
4
 
   Written by:  Andrew Kachites McCallum <mccallum@gnu.ai.mit.edu>
5
 
   Date: March 1995
6
 
 
7
 
   This file is part of the GNUstep Base Library.
8
 
 
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.
13
 
   
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.
18
 
 
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,
22
 
   Boston, MA 02111 USA.
23
 
 
24
 
  AutogsdocSource: Additions/behavior.m
25
 
 
26
 
*/ 
27
 
 
28
 
#ifndef __behavior_h_GNUSTEP_BASE_INCLUDE
29
 
#define __behavior_h_GNUSTEP_BASE_INCLUDE
30
 
#include <GNUstepBase/GSVersionMacros.h>
31
 
 
32
 
#include <GNUstepBase/GSObjCRuntime.h>
33
 
 
34
 
#if     defined(__cplusplus)
35
 
extern "C" {
36
 
#endif
37
 
 
38
 
#if     OS_API_VERSION(GS_API_NONE,GS_API_LATEST)
39
 
 
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.
42
 
 
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.
48
 
 
49
 
   We do not yet deal with Protocols; perhaps we should. 
50
 
 
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
53
 
   future. 
54
 
 
55
 
*/
56
 
 
57
 
GS_EXPORT void behavior_class_add_class (Class class, 
58
 
                               Class behavior);
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);
63
 
 
64
 
/* Set to non-zero if you want debugging messages on stderr. */
65
 
GS_EXPORT void behavior_set_debug(int i);
66
 
 
67
 
#endif  /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
68
 
 
69
 
#if     defined(__cplusplus)
70
 
}
71
 
#endif
72
 
 
73
 
#endif /* __behavior_h_GNUSTEP_BASE_INCLUDE */