46589c9763956cce4e6a59b8cafa010649da1b57
1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Model of the parsed Objective-C files
18 # Model of all the analyzed Objective-C classes
20 # All analyzed classes
21 var classes
= new Array[ObjcClass]
26 # Name of the super classes
27 var super_names
= new Array[String]
29 # Name of this Objective-C class
32 # Attributes of this Objective-C class
33 var attributes
= new Array[ObjcAttribute]
35 # Methods of this Objective-C class
36 var methods
= new Array[ObjcMethod]
39 # Method of an `ObjcClass`
43 # Scope: '+' for a static class method, and '-' for an instance method
44 var scope
: Char is noinit
, writable
46 # Parameters of the method
47 var params
= new Array[Param]
49 # Return type as a `String`
50 var return_type
: String is noinit
, writable
52 # Does this method look like a constructor/method?
53 fun is_init
: Bool do return params
.first
.name
.has_prefix
("init")
56 # Attribute of an `ObjcClass`
60 # Name of this attribute
61 var name
: String is noinit
, writable
63 # Type of this attribute
64 var return_type
: String is noinit
, writable
67 # Property of an `ObjcClass`
69 # Is this property to be commented out?
70 var is_commented
= false is writable
73 # Parameter of an `ObjcMethod`
75 # Parameter name, used by the caller (e.g. `withObject` in `withObject: (NSObject*) obj`)
76 var name
: String is noinit
, writable
78 # Type of the parameter name
79 var return_type
: String is noinit
, writable
81 # Argument name, used within the body (e.g. `obj` in `withObject: (NSObject*) obj`)
82 var variable_name
: String is noinit
, writable
84 # Is this a primitive array? with at least one `[]`.
85 var is_table
= false is writable
87 # Is this a pointer type?
88 var is_pointer
= false is writable
90 # Is this a parameter with only a `name`?
91 var is_single
= false is writable