Package pyplusplus :: Package code_creators :: Module global_variable

Source Code for Module pyplusplus.code_creators.global_variable

  1  # Copyright 2004-2008 Roman Yakovenko.
 
  2  # Distributed under the Boost Software License, Version 1.0. (See
 
  3  # accompanying file LICENSE_1_0.txt or copy at
 
  4  # http://www.boost.org/LICENSE_1_0.txt)
 
  5  
 
  6  import os 
  7  import pygccxml 
  8  import algorithm 
  9  import code_creator 
 10  import declaration_based 
 11  import registration_based 
 12  from pygccxml import declarations 
 13  from pyplusplus import code_repository 
 14  from pyplusplus import decl_wrappers 
 15  
 
16 -class global_variable_base_t( registration_based.registration_based_t 17 , declaration_based.declaration_based_t ):
18 """ 19 Base class for all global variables code creators. Mainly exists to 20 simplify file writers algorithms. 21 """
22 - def __init__(self, variable, wrapper=None ):
26
27 - def _get_wrapper( self ):
28 return self._wrapper
29 - def _set_wrapper( self, new_wrapper ):
30 self._wrapper = new_wrapper
31 wrapper = property( _get_wrapper, _set_wrapper ) 32
33 - def _get_system_headers_impl( self ):
34 return []
35
36 -class global_variable_t( global_variable_base_t ):
37 """ 38 Creates boost.python code that exposes global variable. 39 """
40 - def __init__(self, variable ):
42
43 - def _create_impl(self):