Class: Objc2swiftAssistant::ObjCAbstractParameter

Inherits:
Object
  • Object
show all
Defined in:
lib/objc2swift_assistant/objc_variable_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjCAbstractParameter

Returns a new instance of ObjCAbstractParameter.



12
13
14
15
16
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 12

def initialize
  @pointer_level = 0
  @param_type = nil
  @is_weak = false
end

Instance Attribute Details

#is_block_typeObject

Returns the value of attribute is_block_type.



8
9
10
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 8

def is_block_type
  @is_block_type
end

#is_weakObject

Returns the value of attribute is_weak.



10
11
12
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 10

def is_weak
  @is_weak
end

#match_failureObject

Returns the value of attribute match_failure.



9
10
11
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 9

def match_failure
  @match_failure
end

#param_typeObject

Returns the value of attribute param_type.



6
7
8
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 6

def param_type
  @param_type
end

#pointer_levelObject

0 -> not a pointer; 1 -> *; 2 -> **, …



7
8
9
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 7

def pointer_level
  @pointer_level
end

Instance Method Details

#match_failedObject



18
19
20
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 18

def match_failed
  return ! @match_failure.nil?
end

#process_pointer_str(pointer_str) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/objc2swift_assistant/objc_variable_types.rb', line 22

def process_pointer_str( pointer_str )
  if pointer_str.nil?
    @pointer_level = 0
  else
    @pointer_level = pointer_str.length
  end
end