pyplusplus.code_creators.license

Package pyplusplus :: Package code_creators :: Module license |

# Source Code for Module pyplusplus.code_creators.license

     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 code_creator
     7
     8 -class license_t(code_creator.code_creator_t):
     9      """
    10      This class allows user to put his license on the top of every generated file.
    11      License text will be generated as is.
    12      """
    13 -    def __init__(self, text ):
    14          code_creator.code_creator_t.__init__(self)
    15          self._text = text
    16
    17 -    def _get_text(self):
    18          return self._text
    19 -    def _set_text(self, new_text):
    20          self._text = new_text
    21      text = property( _get_text, _set_text )
    22
    23 -    def _get_system_headers_impl( self ):
    24          return []
    25
    26 -    def _create_impl(self):
    27          return self.text
    28
    29 -    def beautify( self, code ):
    30          return code
    31