(self, the_api, source_package_writer)
Default operations to generate the package.

    Do all the default operations for generating a package.
    1. Walk the template tree to generate the source.
    2. Add in per-language additions to the source
    3. Optionally copy in dependencies
    4. (Side effect) Closes the source_package_writer.

    Args:
      the_api: (Api) The Api instance we are writing a libary for.
      source_package_writer: (LibraryPackage) source output package.
Default operations to generate the package.
Default operations to generate the package .
def _GenerateLibrarySource(self, the_api, source_package_writer):
    """Default operations to generate the package.

    Do all the default operations for generating a package.
    1. Walk the template tree to generate the source.
    2. Add in per-language additions to the source
    3. Optionally copy in dependencies
    4. (Side effect) Closes the source_package_writer.

    Args:
      the_api: (Api) The Api instance we are writing a libary for.
      source_package_writer: (LibraryPackage) source output package.
    """
    list_replacements = {
        '___models_': ['model', the_api.ModelClasses()],
        '___resources_': ['resource', the_api.ResourceClasses()],
        '___topLevelModels_': ['model', the_api.TopLevelModelClasses()],
        }
    self.WalkTemplateTree('templates', self._path_replacements,
                          list_replacements,
                          self._top_level_defines, source_package_writer)
    # Call back to the language specific generator to give it a chance to emit
    # special case elements.
    self.GenerateExtraSourceOutput(source_package_writer)
def _GenerateLibrarySource ( self , the_api , source_package_writer ) : list_replacements = { '___models_' : [ 'model' , the_api . ModelClasses ( ) ] , '___resources_' : [ 'resource' , the_api . ResourceClasses ( ) ] , '___topLevelModels_' : [ 'model' , the_api . TopLevelModelClasses ( ) ] , } self . WalkTemplateTree ( 'templates' , self . _path_replacements , list_replacements , self . _top_level_defines , source_package_writer ) # Call back to the language specific generator to give it a chance to emit # special case elements. self . GenerateExtraSourceOutput ( source_package_writer )