lib/bindata/int.rb in bindata-0.8.1 vs lib/bindata/int.rb in bindata-0.9.0
- old
+ new
@@ -99,73 +99,87 @@
end
# Unsigned 1 byte integer.
class Uint8 < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 8, :little)
end
# Unsigned 2 byte little endian integer.
class Uint16le < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 16, :little)
end
# Unsigned 2 byte big endian integer.
class Uint16be < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 16, :big)
end
# Unsigned 4 byte little endian integer.
class Uint32le < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 32, :little)
end
# Unsigned 4 byte big endian integer.
class Uint32be < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 32, :big)
end
# Unsigned 8 byte little endian integer.
class Uint64le < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 64, :little)
end
# Unsigned 8 byte big endian integer.
class Uint64be < Single
+ register(self.name, self)
Integer.create_uint_methods(self, 64, :big)
end
# Signed 1 byte integer.
class Int8 < Single
+ register(self.name, self)
Integer.create_int_methods(self, 8, :little)
end
# Signed 2 byte little endian integer.
class Int16le < Single
+ register(self.name, self)
Integer.create_int_methods(self, 16, :little)
end
# Signed 2 byte big endian integer.
class Int16be < Single
+ register(self.name, self)
Integer.create_int_methods(self, 16, :big)
end
# Signed 4 byte little endian integer.
class Int32le < Single
+ register(self.name, self)
Integer.create_int_methods(self, 32, :little)
end
# Signed 4 byte big endian integer.
class Int32be < Single
+ register(self.name, self)
Integer.create_int_methods(self, 32, :big)
end
# Signed 8 byte little endian integer.
class Int64le < Single
+ register(self.name, self)
Integer.create_int_methods(self, 64, :little)
end
# Signed 8 byte big endian integer.
class Int64be < Single
+ register(self.name, self)
Integer.create_int_methods(self, 64, :big)
end
end