Class: Quark::Quark::ParsedInt
- Inherits:
-
Object
- Object
- Quark::Quark::ParsedInt
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/quark.rb
Constant Summary
Constants included from DatawireQuarkCore::Static
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
-
#MAX ⇒ Object
Returns the value of attribute MAX.
-
#MIN ⇒ Object
Returns the value of attribute MIN.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
-
#initialize(num) ⇒ ParsedInt
constructor
A new instance of ParsedInt.
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Constructor Details
#initialize(num) ⇒ ParsedInt
Returns a new instance of ParsedInt.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/quark.rb', line 403 def initialize(num) super() temp = self._parseLong(num) if (((temp) < (((self).MIN))) || ((temp) > (((self).MAX)))) (self)._hasValue = false if ((temp) < ((0))) (self)._value = (self).MIN else (self)._value = (self).MAX end else (self)._value = (temp) end nil end |
Instance Attribute Details
#MAX ⇒ Object
Returns the value of attribute MAX.
395 396 397 |
# File 'lib/quark.rb', line 395 def MAX @MAX end |
#MIN ⇒ Object
Returns the value of attribute MIN.
395 396 397 |
# File 'lib/quark.rb', line 395 def MIN @MIN end |
Instance Method Details
#__init_fields__ ⇒ Object
492 493 494 495 496 497 498 499 |
# File 'lib/quark.rb', line 492 def __init_fields__() super self.MIN = (-(2147483647)) - (1) self.MAX = 2147483647 nil end |
#_getClass ⇒ Object
424 425 426 427 428 429 |
# File 'lib/quark.rb', line 424 def _getClass() return "quark.ParsedInt" nil end |
#_getField(name) ⇒ Object
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/quark.rb', line 431 def _getField(name) if ((name) == ("MINUS")) return ::Quark.quark.ParsedNumber.MINUS end if ((name) == ("PLUS")) return ::Quark.quark.ParsedNumber.PLUS end if ((name) == ("ZERO")) return ::Quark.quark.ParsedNumber.ZERO end if ((name) == ("NINE")) return ::Quark.quark.ParsedNumber.NINE end if ((name) == ("_value")) return (self)._value end if ((name) == ("_hasValue")) return (self)._hasValue end if ((name) == ("MIN")) return (self).MIN end if ((name) == ("MAX")) return (self).MAX end return nil nil end |
#_setField(name, value) ⇒ Object
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/quark.rb', line 462 def _setField(name, value) if ((name) == ("MINUS")) ::Quark.quark.ParsedNumber.MINUS = ::DatawireQuarkCore.cast(value) { ::Integer } end if ((name) == ("PLUS")) ::Quark.quark.ParsedNumber.PLUS = ::DatawireQuarkCore.cast(value) { ::Integer } end if ((name) == ("ZERO")) ::Quark.quark.ParsedNumber.ZERO = ::DatawireQuarkCore.cast(value) { ::Integer } end if ((name) == ("NINE")) ::Quark.quark.ParsedNumber.NINE = ::DatawireQuarkCore.cast(value) { ::Integer } end if ((name) == ("_value")) (self)._value = ::DatawireQuarkCore.cast(value) { ::Integer } end if ((name) == ("_hasValue")) (self)._hasValue = ::DatawireQuarkCore.cast(value) { ::Object } end if ((name) == ("MIN")) (self).MIN = ::DatawireQuarkCore.cast(value) { ::Integer } end if ((name) == ("MAX")) (self).MAX = ::DatawireQuarkCore.cast(value) { ::Integer } end nil end |