def is_a? klass
case klass
when NilClass then @type.matches? :null
when FalseClass then @type.matches? :boolean
when TrueClass then @type.matches? :boolean
when Integer then @type.matches?(:uint64) || @type.matches?(:sint64)
when Float then @type.matches? :real32
when Symbol then @type.matches? klass
when String then
@type.matches? :string
when CIM::Variant then @type.matches? klass.type
else
if klass == Integer
@type.matches?(:uint64) || @type.matches?(:sint64)
elsif klass == Float
@type.matches? :real32
elsif klass == String
@type.matches? :string
else
false
end
end
end