Class: Ronin::Support::Binary::CTypes::UnionType::Member Private
- Inherits:
-
Object
- Object
- Ronin::Support::Binary::CTypes::UnionType::Member
- Defined in:
- lib/ronin/support/binary/ctypes/union_type.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a member within a union.
Instance Attribute Summary collapse
-
#type ⇒ Type
readonly
private
The type of the member.
Instance Method Summary collapse
-
#alignment ⇒ Integer
private
The alignment, in bytes, of the member within the union.
-
#initialize(type) ⇒ Member
constructor
private
Initializes the member.
-
#offset ⇒ 0
private
The offset of the member within the union.
-
#size ⇒ Integer
private
The size, in bytes, of the member within the union.
Constructor Details
#initialize(type) ⇒ Member
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initializes the member.
54 55 56 |
# File 'lib/ronin/support/binary/ctypes/union_type.rb', line 54 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Type (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The type of the member.
46 47 48 |
# File 'lib/ronin/support/binary/ctypes/union_type.rb', line 46 def type @type end |
Instance Method Details
#alignment ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The alignment, in bytes, of the member within the union.
84 85 86 |
# File 'lib/ronin/support/binary/ctypes/union_type.rb', line 84 def alignment @type.alignment end |
#offset ⇒ 0
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method is mainly for compatibility with
The offset of the member within the union.
66 67 68 |
# File 'lib/ronin/support/binary/ctypes/union_type.rb', line 66 def offset 0 end |
#size ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The size, in bytes, of the member within the union.
75 76 77 |
# File 'lib/ronin/support/binary/ctypes/union_type.rb', line 75 def size @type.size end |