Class: Rod::PolymorphicJoinElement

Inherits:
JoinElement show all
Defined in:
lib/rod/join_element.rb

Class Method Summary (collapse)

Methods inherited from AbstractModel

build_structure, cache, compatible?, difference, fields, indexed_properties, metadata, path_for_data, properties

Class Method Details

+ (Object) layout



42
43
44
45
46
47
# File 'lib/rod/join_element.rb', line 42

def self.layout
  '  printf("  offset: %lu, index: %lu, class: %lu\n",' +
    '(unsigned long)sizeof(unsigned long), ' +
    '(unsigned long)sizeof(unsigned long), ' +
    '(unsigned long)sizeof(unsigned long));' + "\n"
end

+ (Object) struct_name



38
39
40
# File 'lib/rod/join_element.rb', line 38

def self.struct_name
  "_polymorphic_join_element"
end

+ (Object) typedef_struct



27
28
29
30
31
32
33
34
35
36
# File 'lib/rod/join_element.rb', line 27

def self.typedef_struct
  str = <<-END
  |typedef struct {
  |  unsigned long offset;
  |  unsigned long index;
  |  unsigned long class;
  |} _polymorphic_join_element;
  END
  str.margin
end