Class: IDL::Type::Char
Constant Summary
Constants inherited
from IDL::Type
Long, LongLong, Octet, Short, TinyShort, ULong, ULongLong, UShort, UTinyShort
Instance Method Summary
collapse
Methods inherited from IDL::Type
#instantiate, #is_anonymous?, #is_complete?, #is_local?, #is_node?, #is_template?, #matches?, #resolved_node, #resolved_type, #typeerror, #typename
Instance Method Details
#in_range?(val) ⇒ Boolean
247
248
249
|
# File 'lib/ridl/type.rb', line 247
def in_range?(val)
val >= self.min && val <= self.max
end
|
251
252
253
|
# File 'lib/ridl/type.rb', line 251
def max
255
end
|
243
244
245
|
# File 'lib/ridl/type.rb', line 243
def min
0
end
|
#narrow(obj) ⇒ Object
233
234
235
236
237
|
# File 'lib/ridl/type.rb', line 233
def narrow(obj)
typeerror(obj) unless ::Integer === obj
typeerror(obj) unless (0..255) === obj
obj
end
|
#next(val) ⇒ Object
255
256
257
|
# File 'lib/ridl/type.rb', line 255
def next(val)
val < self.max ? val + 1 : self.min
end
|
#range_length ⇒ Object
239
240
241
|
# File 'lib/ridl/type.rb', line 239
def range_length
256
end
|