Class: Rubex::DataType::CStructOrUnion

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/rubex/data_type/c_struct_or_union.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#==, #base_type, #c_function_ptr?, #char_ptr?, #from_ruby_object, #to_ruby_object

Constructor Details

#initialize(kind, name, c_name, scope) ⇒ CStructOrUnion

Returns a new instance of CStructOrUnion.



7
8
9
10
11
12
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 7

def initialize(kind, name, c_name, scope)
  @kind = kind
  @name = name
  @c_name = c_name
  @scope = scope
end

Instance Attribute Details

#c_nameObject (readonly)

Returns the value of attribute c_name.



5
6
7
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 5

def c_name
  @c_name
end

#kindObject (readonly)

Returns the value of attribute kind.



5
6
7
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 5

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 5

def name
  @name
end

#scopeObject (readonly)

Returns the value of attribute scope.



5
6
7
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 5

def scope
  @scope
end

Instance Method Details

#struct_or_union?Boolean

Returns:



14
15
16
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 14

def struct_or_union?
  true
end

#to_sObject



18
19
20
# File 'lib/rubex/data_type/c_struct_or_union.rb', line 18

def to_s
  @c_name.to_s
end