213: def method_missing aMeth, *aArgs, &aBlockArg
214: if child = vpi_handle_by_name(aMeth.to_s, self)
215:
216: (class << self; self; end).class_eval do
217: define_method aMeth do
218: child
219: end
220: end
221:
222: child
223:
224: else
225: prop = @@propCache[aMeth]
226:
227: if prop.operation
228: self.send(prop.operation, prop.type, *aArgs, &aBlockArg)
229:
230: else
231: case prop.accessor
232: when :d
233: raise NotImplementedError, 'processing of delay values is not yet implemented.'
234:
235:
236:
237: when :l
238: if prop.assignment
239: value = aArgs.shift
240: put_value(value, prop.type, *aArgs)
241: else
242: get_value(prop.type)
243: end
244:
245: when :i
246: vpi_get(prop.type, self) unless prop.assignment
247:
248: when :b
249: unless prop.assignment
250: value = vpi_get(prop, self)
251: value && (value != 0)
252: end
253:
254: when :s
255: vpi_get_str(prop.type, self) unless prop.assignment
256:
257: when :h
258: vpi_handle(prop.type, self) unless prop.assignment
259:
260: else
261: raise NoMethodError, "unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}"
262: end
263: end
264: end
265: end