Class: Steam::ByteWriter::Int64Type

Inherits:
Object
  • Object
show all
Defined in:
lib/steam/byte_writer.rb

Overview

Wrap an Int64 allowing the lo and hi 32 bits to be extracted

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Int64Type

Create an Int64Type instance

Parameters:

  • value (Integer)

    the 64 bit int



15
16
17
# File 'lib/steam/byte_writer.rb', line 15

def initialize(value)
  @value = value
end

Instance Method Details

#hiInteger

The high 32 bits

Returns:

  • (Integer)


29
30
31
# File 'lib/steam/byte_writer.rb', line 29

def hi
  (@value >> 32) & 0xFFFFFFFF
end

#int32sInteger

An array of the low and high bits

Returns:

  • (Integer)


36
37
38
# File 'lib/steam/byte_writer.rb', line 36

def int32s
  [lo, hi]
end

#loInteger

The low 32 bits

Returns:

  • (Integer)


22
23
24
# File 'lib/steam/byte_writer.rb', line 22

def lo
  @value & 0xFFFFFFFF
end