Class: Babeltrace2Gen::BTValueCLass::IntegerUnsigned
- Inherits:
-
Scalar
- Object
- Babeltrace2Gen::BTValueCLass
- Scalar
- Babeltrace2Gen::BTValueCLass::IntegerUnsigned
- Defined in:
- lib/metababel/bt2_values_generator.rb
Constant Summary
Constants included from Babeltrace2Gen::BTPrinter
Babeltrace2Gen::BTPrinter::INDENT_INCREMENT
Instance Attribute Summary
Attributes inherited from Scalar
Attributes inherited from Babeltrace2Gen::BTValueCLass
Instance Method Summary collapse
-
#initialize(name, usr_default_value) ⇒ IntegerUnsigned
constructor
A new instance of IntegerUnsigned.
Methods inherited from Scalar
Methods included from Babeltrace2Gen::BTPrinter
context, #name_sanitized, pr, #scope
Methods inherited from Babeltrace2Gen::BTValueCLass
Constructor Details
#initialize(name, usr_default_value) ⇒ IntegerUnsigned
126 127 128 129 130 131 132 133 |
# File 'lib/metababel/bt2_values_generator.rb', line 126 def initialize(name, usr_default_value) bt_type = self.class.instance_variable_get(:@bt_type) if !usr_default_value.nil? and (!usr_default_value.is_a? Integer or !usr_default_value.between?(0, 2**64 - 1)) raise "Bad default_value for '#{name}' in params.yaml, it must be #{bt_type} and must be in [0,2^64-1], but provided '#{usr_default_value}'." end super(name, usr_default_value) end |