ref/ruby/classes/Vpi/Handle.src/M000046.html in ruby-vpi-16.0.1 vs ref/ruby/classes/Vpi/Handle.src/M000046.html in ruby-vpi-17.0.0
- old
+ new
@@ -3,22 +3,42 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>inspect (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 231</span>
-231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span> <span class="ruby-operator">*</span><span class="ruby-identifier">aPropNames</span>
-232: <span class="ruby-identifier">aPropNames</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-identifier">:fullName</span>, <span class="ruby-identifier">:size</span>, <span class="ruby-identifier">:file</span>, <span class="ruby-identifier">:lineNo</span>
-233:
-234: <span class="ruby-identifier">aPropNames</span>.<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
-235: <span class="ruby-node">"#{name}=#{self.send(name.to_sym)}"</span>
-236: <span class="ruby-keyword kw">end</span>
-237:
-238: <span class="ruby-node">"#<Vpi::Handle #{vpiType_s} #{aPropNames.join(', ')}>"</span>
-239: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/vpi.rb, line 113</span>
+113: <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>
+114: <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>))
+115:
+116: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">format</span>
+117: <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>
+118: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>
+119:
+120: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiScalarVal</span>
+121: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">scalar</span>
+122:
+123: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiIntVal</span>
+124: <span class="ruby-identifier">get_value_wrapper</span>(<span class="ruby-constant">VpiBinStrVal</span>).<span class="ruby-identifier">value</span>.<span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[^01]/</span>, <span class="ruby-value str">'0'</span>).<span class="ruby-identifier">to_i</span>(<span class="ruby-value">2</span>)
+125:
+126: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiRealVal</span>
+127: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">real</span>
+128:
+129: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiTimeVal</span>
+130: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">time</span>
+131:
+132: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiVectorVal</span>
+133: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">vector</span>
+134:
+135: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">VpiStrengthVal</span>
+136: <span class="ruby-identifier">val</span>.<span class="ruby-identifier">value</span>.<span class="ruby-identifier">strength</span>
+137:
+138: <span class="ruby-keyword kw">else</span>
+139: <span class="ruby-identifier">raise</span> <span class="ruby-node">"unknown S_vpi_value.format: #{val.format}"</span>
+140: <span class="ruby-keyword kw">end</span>
+141: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file