Class: GirFFI::UserDefinedPropertyInfo
- Inherits:
-
Object
- Object
- GirFFI::UserDefinedPropertyInfo
- Defined in:
- lib/gir_ffi/user_defined_property_info.rb
Overview
Represents a property of a user defined type. Wraps a GParamSpec with useful helper methods for building property accessors etc.
Defined Under Namespace
Classes: UserDefinedTypeInfo
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#param_spec ⇒ Object
readonly
Returns the value of attribute param_spec.
Instance Method Summary collapse
- #ffi_type ⇒ Object
- #field_symbol ⇒ Object
- #field_type ⇒ Object
-
#initialize(param_spec, container, offset) ⇒ UserDefinedPropertyInfo
constructor
A new instance of UserDefinedPropertyInfo.
- #name ⇒ Object
- #related_array_length_field ⇒ Object
- #writable? ⇒ Boolean
Constructor Details
#initialize(param_spec, container, offset) ⇒ UserDefinedPropertyInfo
Returns a new instance of UserDefinedPropertyInfo.
105 106 107 108 109 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 105 def initialize(param_spec, container, offset) @param_spec = param_spec @container = container @offset = offset end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
111 112 113 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 111 def container @container end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
111 112 113 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 111 def offset @offset end |
#param_spec ⇒ Object (readonly)
Returns the value of attribute param_spec.
111 112 113 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 111 def param_spec @param_spec end |
Instance Method Details
#ffi_type ⇒ Object
129 130 131 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 129 def ffi_type field_type.ffi_type end |
#field_symbol ⇒ Object
133 134 135 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 133 def field_symbol name.to_sym end |
#field_type ⇒ Object
117 118 119 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 117 def field_type @field_type ||= UserDefinedTypeInfo.new @param_spec end |
#name ⇒ Object
113 114 115 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 113 def name @param_spec.accessor_name end |
#related_array_length_field ⇒ Object
121 122 123 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 121 def nil end |
#writable? ⇒ Boolean
125 126 127 |
# File 'lib/gir_ffi/user_defined_property_info.rb', line 125 def writable? param_spec.flags[:writable] end |