Changeset 58

Show
Ignore:
Timestamp:
12/13/06 00:13:08 (2 years ago)
Author:
KirkMcDonald
Message:

Small improvement to inheritance-wrapping docs.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/html_doc/class_wrapping.html

    r57 r58  
    173173    } 
    174174}</pre> 
     175 
     176<p>The <code>OverloadShim</code> template has but a single member, the <code>get_overload</code> function.</p> 
     177 
     178<dl> 
     179<dt><code>ReturnType!(dg_t) get_overload(<span class="t_arg">dg_t</span>, <span class="t_arg">T ...</span>) (dg_t <span class="arg">dg</span>, char[] <span class="arg">name</span>, T <span class="arg">t</span>);</code></dt> 
     180<dd><ul> 
     181    <li><span class="arg">dg</span> should be a delegate to the parent class's method.</li> 
     182    <li><span class="arg">name</span> should be the name of the method as Python understands it to be. <i>(There's no efficient way to derive this automatically based on only the delegate.)</i></li> 
     183    <li><span class="arg">t</span> is a tuple argument. These arguments will be passed on to the actual function call, be it the parent class's implementation or a Python subclass's implementation.</li> 
     184</ul></dd> 
     185</dl> 
     186 
     187<p><code>get_overload</code> returns whatever the method does.</p> 
    175188 
    176189<p>Now, we must replace the old wrapping of Base with this:</p>