Wiki

Changes between Version 1 and Version 2 of Cue

Show
Ignore:
Timestamp:
11/22/10 18:51:20 (14 years ago)
Author:
todd.a
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cue

    v1 v2  
    3232# as for method definition but 'cue' replaces 'def' 
    3333{{{ 
     34#!cobra 
    3435cue <methodName> [as <returnType>]  [is <AccessModifiers>] 
    3536    [has <Attributes>] 
     
    8889== Initializer == 
    8990{{{ 
     91#!cobra 
    9092cue init 
    9193}}} 
     
    110112== Destructor ==  
    111113{{{ 
     114#!cobra 
    112115cue finalize 
    113116}}} 
     
    123126== Hash Code Calculation == 
    124127{{{ 
     128#!cobra 
    125129cue hash as int 
    126130}}} 
     
    139143== Comparison == 
    140144{{{ 
     145#!cobra 
    141146cue compare(other) as int 
    142147}}} 
     
    152157== Object equality == 
    153158{{{ 
     159#!cobra 
    154160cue equals(other) as int 
    155161}}} 
     
    160166Can be pretty much boilerplate along the following lines 
    161167{{{ 
     168#!cobra 
    162169cue equals(other [as Object]) as bool 
    163170    if this is other, return true 
     
    173180== Provide enumeration/iteration capability == 
    174181{{{ 
     182#!cobra 
    175183cue enumerate as <Type>* 
    176184}}}  
     
    180188i.e so that the cobra construct 
    181189{{{ 
     190#!cobra 
    182191for item in <myCollectionObject> 
    183192}}}  
     
    193202== Examples == 
    194203{{{ 
     204#!cobra 
    195205class Customer 
    196206