Class: GirFFI::Builders::UserDefinedBuilder::UserDefinedPropertyFieldInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi/builders/user_defined_builder.rb

Overview

TODO: Move this to its own file. TODO: See if this or FieldTypeInfo can be merged with with UserDefinedPropertyInfo.

Defined Under Namespace

Classes: FieldTypeInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(property_info, container, offset) ⇒ UserDefinedPropertyFieldInfo

Returns a new instance of UserDefinedPropertyFieldInfo.



215
216
217
218
219
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 215

def initialize(property_info, container, offset)
  @property_info = property_info
  @container = container
  @offset = offset
end

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



221
222
223
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 221

def container
  @container
end

#offsetObject (readonly)

Returns the value of attribute offset.



221
222
223
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 221

def offset
  @offset
end

Instance Method Details

#field_typeObject



227
228
229
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 227

def field_type
  @field_type ||= FieldTypeInfo.new @property_info
end

#nameObject



223
224
225
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 223

def name
  @property_info.accessor_name
end


231
232
233
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 231

def related_array_length_field
  nil
end

#writable?Boolean

Returns:



235
236
237
# File 'lib/gir_ffi/builders/user_defined_builder.rb', line 235

def writable?
  @property_info.writable?
end