parameters: (self)
return_statement: return self.GenerateHeader('generated_api', c)
docstring: Generates the header for API registration / declaration
docstring_summary: Generates the header for API registration / declaration
docstring_tokens: Generates the header for API registration / declaration
function: def GenerateAPIHeader(self):
      """Generates the header for API registration / declaration"""
      c = code.Code()
  
      c.Append('#include <string>')
      c.Append()
      c.Append('#include "base/basictypes.h"')
  
      for namespace in self._model.namespaces.values():
        namespace_name = namespace.unix_name.replace("experimental_", "")
        c.Append('#include "chrome/browser/extensions/api/%s/%s_api.h"' % (
            namespace_name, namespace_name))
  
      c.Append()
      c.Append("class ExtensionFunctionRegistry;")
      c.Append()
  
      c.Concat(self._cpp_type_generator.GetRootNamespaceStart())
      for namespace in self._model.namespaces.values():
        c.Append("// TODO(miket): emit code for %s" % (namespace.unix_name))
      c.Append()
      c.Concat(self.GenerateFunctionRegistry())
      c.Concat(self._cpp_type_generator.GetRootNamespaceEnd())
      c.Append()
      return self.GenerateHeader('generated_api', c)
function_tokens: def GenerateAPIHeader ( self ) : c = code . Code ( ) c . Append ( '#include <string>' ) c . Append ( ) c . Append ( '#include "base/basictypes.h"' ) for namespace in self . _model . namespaces . values ( ) : namespace_name = namespace . unix_name . replace ( "experimental_" , "" ) c . Append ( '#include "chrome/browser/extensions/api/%s/%s_api.h"' % ( namespace_name , namespace_name ) ) c . Append ( ) c . Append ( "class ExtensionFunctionRegistry;" ) c . Append ( ) c . Concat ( self . _cpp_type_generator . GetRootNamespaceStart ( ) ) for namespace in self . _model . namespaces . values ( ) : c . Append ( "// TODO(miket): emit code for %s" % ( namespace . unix_name ) ) c . Append ( ) c . Concat ( self . GenerateFunctionRegistry ( ) ) c . Concat ( self . _cpp_type_generator . GetRootNamespaceEnd ( ) ) c . Append ( ) return self . GenerateHeader ( 'generated_api' , c )