ref/ruby/classes/Vpi/Handle.src/M000090.html in ruby-vpi-11.1.0 vs ref/ruby/classes/Vpi/Handle.src/M000090.html in ruby-vpi-11.1.1
- old
+ new
@@ -3,28 +3,42 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>[] (Vpi::Handle)</title>
+ <title>get_value (Vpi::Handle)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 177</span>
-177: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aTypes</span>
-178: <span class="ruby-identifier">handles</span> = []
-179:
-180: <span class="ruby-identifier">aTypes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
-181: <span class="ruby-identifier">t</span> = <span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">t</span>)
-182:
-183: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">itr</span> = <span class="ruby-identifier">vpi_iterate</span>(<span class="ruby-identifier">t</span>, <span class="ruby-keyword kw">self</span>)
-184: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">h</span> = <span class="ruby-identifier">vpi_scan</span>(<span class="ruby-identifier">itr</span>)
-185: <span class="ruby-identifier">handles</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">h</span>
-186: <span class="ruby-keyword kw">end</span>
-187: <span class="ruby-keyword kw">end</span>
-188: <span class="ruby-keyword kw">end</span>
-189:
-190: <span class="ruby-identifier">handles</span>
-191: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 72</span>
+ 72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value</span> <span class="ruby-identifier">aFormat</span> = <span class="ruby-constant">VpiObjTypeVal</span>
+ 73: <span class="ruby-identifier">val</span> = <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-identifier">resolve_prop_type</span>(<span class="ruby-identifier">aFormat</span>))
+ 74:
+ 75: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
+ 76: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiBinStrVal</span>, <span class="ruby-constant">VpiOctStrVal</span>, <span class="ruby-constant">VpiDecStrVal</span>, <span class="ruby-constant">VpiHexStrVal</span>, <span class="ruby-constant">VpiStringVal</span>
+ 77: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
+ 78:
+ 79: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
+ 80: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
+ 81:
+ 82: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
+ 83: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiHexStrVal</span>).<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_i</span>(<span class="ruby-value">16</span>)
+ 84:
+ 85: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
+ 86: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
+ 87:
+ 88: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
+ 89: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
+ 90:
+ 91: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
+ 92: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
+ 93:
+ 94: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
+ 95: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
+ 96:
+ 97: <span class="ruby-keyword kw">else</span>
+ 98: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{val.format}"</span>
+ 99: <span class="ruby-keyword kw">end</span>
+100: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file