Class: HDLRuby::LowDB::Value

Inherits:
Base::Value
  • Object
show all
Defined in:
lib/HDLRuby/hruby_db.rb

Overview

Describes a value.

Instance Method Summary collapse

Constructor Details

#initialize(type, content) ⇒ Value

Creates a new value typed as +type+ and containing numeric +content+.



329
330
331
332
333
334
335
336
337
338
339
# File 'lib/HDLRuby/hruby_db.rb', line 329

def initialize(type,content)
    # Ensures type is from Low::Type
    type = Type.get(type)
    # # Ensures the content is valid for low-level hardware.
    # unless content.is_a?(Numeric) or 
    #        content.is_a?(HDLRuby::BitString) then
    #     raise "Invalid type for a value content: #{content.class}."
    # end # NOW CHECKED BY BASE
    # Initialize the value structure.
    super(type,content)
end