<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Class: P4Table</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="classHeader"> <h1>P4Table <sup class="type-note">(Class)</sup></h1> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../files/p4table_rb.html"> p4table.rb </a> <br /> </td> </tr> <tr class="top-aligned-row"> <td><strong>Parent:</strong></td> <td> Object </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="description"> <p> ******************************************************************************* </p> <ul> <li>Base class for all table classes. </li> </ul> <p> ******************************************************************************* </p> </div> <div id="method-list"> <h2 class="section-bar">Methods</h2> <div class="name-list"> <a href="#M000025">load_record</a> <a href="#M000023">new</a> <a href="#M000024">new_record</a> <a href="#M000026">query</a> <a href="#M000027">storage_map</a> </div> </div> <div id="attribute-list"> <h2 class="section-bar">Attributes</h2> <div class="name-list"> <table> <tr class="top-aligned-row context-row"> <td class="context-item-name">name</td> <td class="context-item-value"> [R] </td> <td class="context-item-desc"></td> </tr> <tr class="top-aligned-row context-row"> <td class="context-item-name">p4</td> <td class="context-item-value"> [R] </td> <td class="context-item-desc"></td> </tr> </table> </div> </div> </div> <!-- if includes --> <!-- if method_list --> <div id="methods"> <h2 class="section-bar">Public Class methods</h2> <div id="method-M000023" class="method-detail"> <a name="M000023"></a> <div class="method-heading"> <a href="#M000023" class="method-signature"> <span class="method-name">new</span><span class="method-args">( p4, name )</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" onclick="toggleCode('M000023-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000023-source"> <pre> <span class="ruby-comment cmt"># File p4table.rb, line 534</span> 534: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">p4</span>, <span class="ruby-identifier">name</span> ) 535: <span class="ruby-ivar">@p4</span> = <span class="ruby-identifier">p4</span> 536: <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span> 537: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <h2 class="section-bar">Public Instance methods</h2> <div id="method-M000025" class="method-detail"> <a name="M000025"></a> <div class="method-heading"> <a href="#M000025" class="method-signature"> <span class="method-name">load_record</span><span class="method-args">( seq )</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" onclick="toggleCode('M000025-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000025-source"> <pre> <span class="ruby-comment cmt"># File p4table.rb, line 545</span> 545: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_record</span>( <span class="ruby-identifier">seq</span> ) 546: <span class="ruby-constant">P4Record</span>.<span class="ruby-identifier">load</span>( <span class="ruby-identifier">p4</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-constant">P4RecId</span>.<span class="ruby-identifier">new</span>( <span class="ruby-ivar">@name</span>, <span class="ruby-identifier">seq</span> ) ) 547: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div id="method-M000024" class="method-detail"> <a name="M000024"></a> <div class="method-heading"> <a href="#M000024" class="method-signature"> <span class="method-name">new_record</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" onclick="toggleCode('M000024-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000024-source"> <pre> <span class="ruby-comment cmt"># File p4table.rb, line 541</span> 541: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_record</span> 542: <span class="ruby-constant">P4Record</span>.<span class="ruby-identifier">create</span>( <span class="ruby-identifier">p4</span>, <span class="ruby-keyword kw">self</span> ) 543: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div id="method-M000026" class="method-detail"> <a name="M000026"></a> <div class="method-heading"> <a href="#M000026" class="method-signature"> <span class="method-name">query</span><span class="method-args">( expr )</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" onclick="toggleCode('M000026-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000026-source"> <pre> <span class="ruby-comment cmt"># File p4table.rb, line 549</span> 549: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query</span>( <span class="ruby-identifier">expr</span> ) 550: <span class="ruby-constant">P4Record</span>.<span class="ruby-identifier">query</span>( <span class="ruby-identifier">p4</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">expr</span> ) 551: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> <div id="method-M000027" class="method-detail"> <a name="M000027"></a> <div class="method-heading"> <a href="#M000027" class="method-signature"> <span class="method-name">storage_map</span><span class="method-args">( rec )</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" onclick="toggleCode('M000027-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000027-source"> <pre> <span class="ruby-comment cmt"># File p4table.rb, line 560</span> 560: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">storage_map</span>( <span class="ruby-identifier">rec</span> ) 561: <span class="ruby-keyword kw">return</span> [ <span class="ruby-identifier">rec</span>.<span class="ruby-identifier">table</span>.<span class="ruby-identifier">name</span> ] 562: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 4678 | Tony Smith |
Update p4table.rb to use the new spec parsing and formatting features of P4Ruby. This means we now only need one Perforce client instance to handle specs in both hash form and text form. |
||
#1 | 4677 | Tony Smith |
Move P4table.rb to the P4Ruby library and rename it to p4table.rb instead. There's an update coming so this is just the move. |