2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 18:12:43 +00:00

- Doc fix, about accessing the operators in the interface file

[SVN r18097]
This commit is contained in:
Bruno da Silva de Oliveira
2003-03-26 18:35:53 +00:00
parent f04be3fc1b
commit 726d2beffd
4 changed files with 20 additions and 4 deletions

View File

@@ -188,7 +188,14 @@ with the function [^exclude]:
exclude(World.greet)
exclude(World.msg)
Easy, huh? [$theme/smiley.gif]
To access the operators of a class, access the member [^operator] like this
(supposing that [^C] is a class being exported):
exclude(C.operator['+'])
exclude(C.operator['*'])
exclude(C.operator['<<'])
The string inside the brackets is the same as the name of the operator in C++.[br]
[page:1 Policies]

View File

@@ -50,7 +50,15 @@ with the function <tt>exclude</tt>:</p>
</span><span class=identifier>exclude</span><span class=special>(</span><span class=identifier>World</span><span class=special>.</span><span class=identifier>msg</span><span class=special>)
</span></pre></code>
<p>
Easy, huh? <img src="theme/smiley.gif"></img></p>
To access the operators of a class, access the member <tt>operator</tt> like this
(supposing that <tt>C</tt> is a class being exported):</p>
<code><pre>
<span class=identifier>exclude</span><span class=special>(</span><span class=identifier>C</span><span class=special>.</span><span class=keyword>operator</span><span class=special>[</span><span class=literal>'+'</span><span class=special>])
</span><span class=identifier>exclude</span><span class=special>(</span><span class=identifier>C</span><span class=special>.</span><span class=keyword>operator</span><span class=special>[</span><span class=literal>'*'</span><span class=special>])
</span><span class=identifier>exclude</span><span class=special>(</span><span class=identifier>C</span><span class=special>.</span><span class=keyword>operator</span><span class=special>[</span><span class=literal>'&lt;&lt;'</span><span class=special>])
</span></pre></code>
<p>
The string inside the brackets is the same as the name of the operator in C++.<br></p>
<table border="0">
<tr>
<td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>

View File

@@ -1 +1,2 @@
Class('operators::C', 'operators.h')
C = Class('operators::C', 'operators.h')
#exclude(C.operator['+'])

View File

@@ -26,7 +26,7 @@ import settings
from policies import *
from CppParser import CppParser, CppParserError
__VERSION__ = '0.6'
__VERSION__ = '0.6.1'
def GetDefaultIncludes():
if 'INCLUDE' in os.environ: