Package pyplusplus :: Package code_creators :: Module module_body |

# Source Code for Module pyplusplus.code_creators.module_body

     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 compound
     8
     9 -class module_body_t(compound.compound_t):
    10 -    def __init__( self, name ):
    11          compound.compound_t.__init__(self )
    12          self._name = name
    13
    14 -    def _get_name(self):
    15          return self._name
    16      name = property( _get_name )
    17
    18 -    def _create_impl(self):
    19          result = []
    20          result.append( "BOOST_PYTHON_MODULE(%s){" % self.name )
    21          result.append( compound.compound_t.create_internal_code( self.creators ) )
    22          result.append( "}" )
    23          return os.linesep.join( result )
    24
    25 -    def _get_system_headers_impl( self ):
    26          return []
    27