source: vendor/gcc/3.2.2/libobjc/objc/encoding.h

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.3 KB
Line 
1/* Encoding of types for Objective C.
2 Copyright (C) 1993, 1997 Free Software Foundation, Inc.
3
4Author: Kresten Krab Thorup
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING. If not, write to
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA. */
22
23/* As a special exception, if you link this library with files
24 compiled with GCC to produce an executable, this does not cause
25 the resulting executable to be covered by the GNU General Public License.
26 This exception does not however invalidate any other reasons why
27 the executable file might be covered by the GNU General Public License. */
28
29#ifndef __encoding_INCLUDE_GNU
30#define __encoding_INCLUDE_GNU
31
32#include <ctype.h>
33#include "objc/objc-api.h"
34
35#define _C_CONST 'r'
36#define _C_IN 'n'
37#define _C_INOUT 'N'
38#define _C_OUT 'o'
39#define _C_BYCOPY 'O'
40#define _C_BYREF 'R'
41#define _C_ONEWAY 'V'
42#define _C_GCINVISIBLE '!'
43
44#define _F_CONST 0x01
45#define _F_IN 0x01
46#define _F_OUT 0x02
47#define _F_INOUT 0x03
48#define _F_BYCOPY 0x04
49#define _F_BYREF 0x08
50#define _F_ONEWAY 0x10
51#define _F_GCINVISIBLE 0x20
52
53int objc_aligned_size (const char* type);
54int objc_sizeof_type (const char* type);
55int objc_alignof_type (const char* type);
56int objc_aligned_size (const char* type);
57int objc_promoted_size (const char* type);
58
59const char* objc_skip_type_qualifiers (const char* type);
60const char* objc_skip_typespec (const char* type);
61const char* objc_skip_offset (const char* type);
62const char* objc_skip_argspec (const char* type);
63int method_get_number_of_arguments (struct objc_method*);
64int method_get_sizeof_arguments (struct objc_method*);
65
66char* method_get_first_argument (struct objc_method*,
67 arglist_t argframe,
68 const char** type);
69char* method_get_next_argument (arglist_t argframe,
70 const char **type);
71char* method_get_nth_argument (struct objc_method* m,
72 arglist_t argframe,
73 int arg,
74 const char **type);
75
76unsigned objc_get_type_qualifiers (const char* type);
77
78
79struct objc_struct_layout
80{
81 const char *original_type;
82 const char *type;
83 const char *prev_type;
84 unsigned int record_size;
85 unsigned int record_align;
86};
87
88void objc_layout_structure (const char *type,
89 struct objc_struct_layout *layout);
90BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout);
91void objc_layout_finish_structure (struct objc_struct_layout *layout,
92 unsigned int *size,
93 unsigned int *align);
94void objc_layout_structure_get_info (struct objc_struct_layout *layout,
95 unsigned int *offset,
96 unsigned int *align,
97 const char **type);
98
99#endif /* __encoding_INCLUDE_GNU */
Note: See TracBrowser for help on using the repository browser.