1 | <html> |
---|
2 | <head> |
---|
3 | <!-- Generated by the Spirit (http://spirit.sf.net) QuickDoc --> |
---|
4 | <title>Global Variables</title> |
---|
5 | <link rel="stylesheet" href="theme/style.css" type="text/css"> |
---|
6 | <link rel="prev" href="smart_pointers.html"> |
---|
7 | <link rel="next" href="adding_new_methods.html"> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | <table width="100%" height="48" border="0" cellspacing="2"> |
---|
11 | <tr> |
---|
12 | <td><img src="../../../../boost.png"> |
---|
13 | </td> |
---|
14 | <td width="85%"> |
---|
15 | <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Global Variables</b></font> |
---|
16 | </td> |
---|
17 | </tr> |
---|
18 | </table> |
---|
19 | <br> |
---|
20 | <table border="0"> |
---|
21 | <tr> |
---|
22 | <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> |
---|
23 | <td width="30"><a href="smart_pointers.html"><img src="theme/l_arr.gif" border="0"></a></td> |
---|
24 | <td width="20"><a href="adding_new_methods.html"><img src="theme/r_arr.gif" border="0"></a></td> |
---|
25 | </tr> |
---|
26 | </table> |
---|
27 | <p> |
---|
28 | To export global variables, use the <tt>Var</tt> construct:</p> |
---|
29 | <code><pre> |
---|
30 | <span class=identifier>Var</span><span class=special>(</span><span class=string>"myglobal"</span><span class=special>, </span><span class=string>"foo.h"</span><span class=special>) |
---|
31 | </span></pre></code> |
---|
32 | <p> |
---|
33 | Beware of non-const global variables: changes in Python won't reflect in C++! |
---|
34 | If you really must change them in Python, you will have to write some accessor |
---|
35 | functions, and export those.</p> |
---|
36 | <table border="0"> |
---|
37 | <tr> |
---|
38 | <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td> |
---|
39 | <td width="30"><a href="smart_pointers.html"><img src="theme/l_arr.gif" border="0"></a></td> |
---|
40 | <td width="20"><a href="adding_new_methods.html"><img src="theme/r_arr.gif" border="0"></a></td> |
---|
41 | </tr> |
---|
42 | </table> |
---|
43 | <br> |
---|
44 | <hr size="1"><p class="copyright">Copyright © 2003 Bruno da Silva de Oliveira<br>Copyright © 2002-2003 Joel de Guzman<br><br> |
---|
45 | <font size="2">Permission to copy, use, modify, sell and distribute this document |
---|
46 | is granted provided this copyright notice appears in all copies. This document |
---|
47 | is provided "as is" without express or implied warranty, and with |
---|
48 | no claim as to its suitability for any purpose. </font> </p> |
---|
49 | </body> |
---|
50 | </html> |
---|