class Gdsii::RecData::Real4
Class for REAL4 data type (UNSUPPORTED - will raise an exception)
Attributes
value[R]
Value is an array of floating point numbers
Public Class Methods
new(value)
click to toggle source
Will raise an exception immediately as REAL4 is not supported in the GDSII specification.
# File lib/gdsii/record/datatypes/real4.rb, line 17 def initialize(value) raise "GDT_REAL4 is unsupported" end
read(file, byte_count)
click to toggle source
just create the Gdsii::RecData::Real4 object and raise the exception
# File lib/gdsii/record/datatypes/real4.rb, line 33 def Real4.read(file, byte_count) Real4.new([0]) end
Public Instance Methods
byte_size()
click to toggle source
Returns the size of the record data in bytes. Each array element consumes 4 bytes (hence REAL4).
# File lib/gdsii/record/datatypes/real4.rb, line 28 def byte_size() @value.length * 4 end
to_s()
click to toggle source
Converts the array of floating point values to a string (values are joined by spaces).
# File lib/gdsii/record/datatypes/real4.rb, line 44 def to_s() value.map {|v| v.to_s}.join(' ') end
value=(value)
click to toggle source
Raises an TypeError exception as REAL4 is not supported
# File lib/gdsii/record/datatypes/real4.rb, line 22 def value=(value) raise "GDT_REAL4 is unsupported" end
write(file)
click to toggle source
Raises an exception since REAL4 is unsupported
# File lib/gdsii/record/datatypes/real4.rb, line 38 def write(file) raise "GDT_REAL4 is unsupported" end