Changes between Version 1 and Version 2 of Cue
- Timestamp:
- 11/22/10 18:51:20 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Cue
v1 v2 32 32 # as for method definition but 'cue' replaces 'def' 33 33 {{{ 34 #!cobra 34 35 cue <methodName> [as <returnType>] [is <AccessModifiers>] 35 36 [has <Attributes>] … … 88 89 == Initializer == 89 90 {{{ 91 #!cobra 90 92 cue init 91 93 }}} … … 110 112 == Destructor == 111 113 {{{ 114 #!cobra 112 115 cue finalize 113 116 }}} … … 123 126 == Hash Code Calculation == 124 127 {{{ 128 #!cobra 125 129 cue hash as int 126 130 }}} … … 139 143 == Comparison == 140 144 {{{ 145 #!cobra 141 146 cue compare(other) as int 142 147 }}} … … 152 157 == Object equality == 153 158 {{{ 159 #!cobra 154 160 cue equals(other) as int 155 161 }}} … … 160 166 Can be pretty much boilerplate along the following lines 161 167 {{{ 168 #!cobra 162 169 cue equals(other [as Object]) as bool 163 170 if this is other, return true … … 173 180 == Provide enumeration/iteration capability == 174 181 {{{ 182 #!cobra 175 183 cue enumerate as <Type>* 176 184 }}} … … 180 188 i.e so that the cobra construct 181 189 {{{ 190 #!cobra 182 191 for item in <myCollectionObject> 183 192 }}} … … 193 202 == Examples == 194 203 {{{ 204 #!cobra 195 205 class Customer 196 206