# File lib/ruby-vpi/vpi.rb, line 223
223:     def method_missing aMeth, *aArgs, &aBlockArg
224:       if child = vpi_handle_by_name(aMeth.to_s, self)
225:         # cache the child for future accesses, in order to cut down number of calls to method_missing
226:           (class << self; self; end).class_eval do
227:             define_method aMeth do
228:               child
229:             end
230:           end
231: 
232:         child
233: 
234:       else
235:         prop = @@propCache[aMeth]
236: 
237:         if prop.operation
238:           self.send(prop.operation, prop.type, *aArgs, &aBlockArg)
239: 
240:         else
241:           case prop.accessor
242:             when :d     # delay values
243:               raise NotImplementedError, 'processing of delay values is not yet implemented.'
244:               # TODO: vpi_put_delays
245:               # TODO: vpi_get_delays
246: 
247:             when :l     # logic values
248:               if prop.assignment
249:                 value = aArgs.shift
250:                 put_value(value, prop.type, *aArgs)
251:               else
252:                 get_value(prop.type)
253:               end
254: 
255:             when :i     # integer values
256:               vpi_get(prop.type, self) unless prop.assignment
257: 
258:             when :b # boolean values
259:               unless prop.assignment
260:                 value = vpi_get(prop, self)
261:                 value && (value != 0)   # zero is false in C
262:               end
263: 
264:             when :s     # string values
265:               vpi_get_str(prop.type, self) unless prop.assignment
266: 
267:             when :h     # handle values
268:               vpi_handle(prop.type, self) unless prop.assignment
269: 
270:             else
271:               raise NoMethodError, "unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}"
272:           end
273:         end
274:       end
275:     end