diff --git a/pyste/doc/pyste.txt b/pyste/doc/pyste.txt index 813b77ef..585df472 100644 --- a/pyste/doc/pyste.txt +++ b/pyste/doc/pyste.txt @@ -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] diff --git a/pyste/doc/renaming_and_excluding.html b/pyste/doc/renaming_and_excluding.html index 29a8001b..4f56bb92 100644 --- a/pyste/doc/renaming_and_excluding.html +++ b/pyste/doc/renaming_and_excluding.html @@ -50,7 +50,15 @@ with the function exclude:

exclude(World.msg)

-Easy, huh?

+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++.

diff --git a/pyste/example/operators.pyste b/pyste/example/operators.pyste index ed0f5083..4ab7a370 100644 --- a/pyste/example/operators.pyste +++ b/pyste/example/operators.pyste @@ -1 +1,2 @@ -Class('operators::C', 'operators.h') +C = Class('operators::C', 'operators.h') +#exclude(C.operator['+']) diff --git a/pyste/src/pyste.py b/pyste/src/pyste.py index 28f3d497..e826a319 100644 --- a/pyste/src/pyste.py +++ b/pyste/src/pyste.py @@ -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: