Class: BOAST::CustomType
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#vector_length ⇒ Object
readonly
Returns the value of attribute vector_length.
Instance Method Summary collapse
- #decl ⇒ Object
-
#initialize(hash = {}) ⇒ CustomType
constructor
A new instance of CustomType.
Methods inherited from DataType
Methods included from PrivateStateAccessor
private_boolean_state_accessor, private_state_accessor
Constructor Details
#initialize(hash = {}) ⇒ CustomType
Returns a new instance of CustomType.
346 347 348 349 350 351 352 353 |
# File 'lib/BOAST/DataTypes.rb', line 346 def initialize(hash={}) @name = hash[:type_name] @size = hash[:size] @size = 0 if @size.nil? @vector_length = hash[:vector_length] @vector_length = 1 if @vector_length.nil? @total_size = @vector_length*@size end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
345 346 347 |
# File 'lib/BOAST/DataTypes.rb', line 345 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
345 346 347 |
# File 'lib/BOAST/DataTypes.rb', line 345 def size @size end |
#vector_length ⇒ Object (readonly)
Returns the value of attribute vector_length.
345 346 347 |
# File 'lib/BOAST/DataTypes.rb', line 345 def vector_length @vector_length end |