Class: Gogyou::Model::Struct::Creator

Inherits:
BasicCreator show all
Defined in:
lib/gogyou/model.rb

Instance Attribute Summary

Attributes inherited from BasicCreator

#fields, #offset, #typemap

Instance Method Summary collapse

Methods inherited from BasicCreator

#addfield, #addfield!, #const, #define_container, #flatten_field, #maxalign, #maxsize, #parse!, #struct, #typedef, #union

Instance Method Details

#bytealign(bytesize) ⇒ Object

Raises:

  • (NotImplementedError)


436
437
438
# File 'lib/gogyou/model.rb', line 436

def bytealign(bytesize)
  raise NotImplementedError
end

#padding(bytesize) ⇒ Object

Raises:

  • (NotImplementedError)


440
441
442
# File 'lib/gogyou/model.rb', line 440

def padding(bytesize)
  raise NotImplementedError
end

#to_modelObject



444
445
446
# File 'lib/gogyou/model.rb', line 444

def to_model
  Model::Struct.new(offset.align_ceil(maxalign), maxalign, flatten_field)
end