237: def method_missing aMeth, *aArgs, &aBlockArg
238: if child = vpi_handle_by_name(aMeth.to_s, self)
239:
240: (class << self; self; end).class_eval do
241: define_method aMeth do
242: child
243: end
244: end
245:
246: child
247:
248: else
249: prop = @@propCache[aMeth]
250:
251: if prop.operation
252: self.send(prop.operation, prop.type, *aArgs, &aBlockArg)
253:
254: else
255: case prop.accessor
256: when :d
257: raise NotImplementedError, 'processing of delay values is not yet implemented.'
258:
259:
260:
261: when :l
262: if prop.assignment
263: value = aArgs.shift
264: put_value(value, prop.type, *aArgs)
265: else
266: get_value(prop.type)
267: end
268:
269: when :i
270: vpi_get(prop.type, self) unless prop.assignment
271:
272: when :b
273: unless prop.assignment
274: value = vpi_get(prop, self)
275: value && (value != 0)
276: end
277:
278: when :s
279: vpi_get_str(prop.type, self) unless prop.assignment
280:
281: when :h
282: vpi_handle(prop.type, self) unless prop.assignment
283:
284: else
285: raise NoMethodError, "unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}"
286: end
287: end
288: end
289: end