class TypeArray

A R R A Y ##

Attributes

var_sub_type[RW]
varname[RW]

Public Class Methods

new( name , sub_type) click to toggle source
Calls superclass method ObjCType::new
# File lib/ObjCGenerator/types.rb, line 218
def initialize( name , sub_type)
  super(name)

  @var_sub_type = sub_type
end

Public Instance Methods

conversion_value(origin) click to toggle source
# File lib/ObjCGenerator/types.rb, line 230
def conversion_value origin
  "[NSArray arrayWithArray:#{origin}]"
end
copyrow(newVarName) click to toggle source
# File lib/ObjCGenerator/types.rb, line 242
def copyrow newVarName
  "#{newVarName}.#{self.varname}  = [self.#{self.varname} copyWithZone:nil];"
end
default_value() click to toggle source
# File lib/ObjCGenerator/types.rb, line 227
def default_value
  "@[]"
end
description_row() click to toggle source
# File lib/ObjCGenerator/types.rb, line 239
def description_row
  "@\"self.#{self.varname} = %@\" , self.#{self.varname}"
end
hash_row() click to toggle source
# File lib/ObjCGenerator/types.rb, line 245
def hash_row
  "[self.#{self.varname} hash];"
end
inEquality_test(other) click to toggle source
# File lib/ObjCGenerator/types.rb, line 236
def inEquality_test other
  "![self.#{self.varname}  isEqual:#{other}.#{self.varname}]"
end
property_definition() click to toggle source
# File lib/ObjCGenerator/types.rb, line 224
def property_definition
  "@property (nonatomic) NSArray *#{@varname}; //@[#{var_sub_type}]"
end
to_dictionary_item() click to toggle source
# File lib/ObjCGenerator/types.rb, line 233
def to_dictionary_item
  "@\"#{@varname}\" : self.#{@varname}  ?: @[]"
end