Class: IDL::Type::Char
Constant Summary
Constants inherited
from IDL::Type
Long, LongLong, Octet, Short, ULong, ULongLong, UShort
Instance Method Summary
collapse
Methods inherited from IDL::Type
#instantiate, #is_anonymous?, #is_complete?, #is_local?, #is_node?, #is_template?, #resolved_node, #resolved_type, #typeerror, #typename
Instance Method Details
#in_range?(val) ⇒ Boolean
198
199
200
|
# File 'lib/ridl/type.rb', line 198
def in_range?(val)
val >= self.min && val <= self.max
end
|
201
202
203
|
# File 'lib/ridl/type.rb', line 201
def max
255
end
|
195
196
197
|
# File 'lib/ridl/type.rb', line 195
def min
0
end
|
#narrow(obj) ⇒ Object
187
188
189
190
191
|
# File 'lib/ridl/type.rb', line 187
def narrow(obj)
typeerror(obj) unless ::Integer === obj
typeerror(obj) unless (0..255) === obj
obj
end
|
#next(val) ⇒ Object
205
206
207
|
# File 'lib/ridl/type.rb', line 205
def next(val)
val < self.max ? val + 1 : self.min
end
|
#range_length ⇒ Object
192
193
194
|
# File 'lib/ridl/type.rb', line 192
def range_length
256
end
|