tools/json_schema_compiler/h_generator.py
def _GenerateFunction(self, function):
    """Generates the namespaces and structs for a function.
    """
    c = Code()
    # TODO(kalman): Use function.unix_name not Classname here.
    function_namespace = cpp_util.Classname(function.name)
    # Windows has a #define for SendMessage, so to avoid any issues, we need
    # to not use the name.
    if function_namespace == 'SendMessage':
      function_namespace = 'PassMessage'
    (c.Append('namespace %s {' % function_namespace)
      .Append()
      .Cblock(self._GenerateFunctionParams(function))
    )
    if function.returns_async:
      c.Cblock(self._GenerateFunctionResults(function.returns_async))
    c.Append('}  // namespace %s' % function_namespace)
    return c
Generates the namespaces and structs for a function.
    
Generates the namespaces and structs for a function.
Generates the namespaces and structs for a function .
def _GenerateFunction(self, function):
    c = Code()
    function_namespace = cpp_util.Classname(function.name)
    if function_namespace == 'SendMessage':
      function_namespace = 'PassMessage'
    (c.Append('namespace %s {' % function_namespace)
      .Append()
      .Cblock(self._GenerateFunctionParams(function))
    )
    if function.returns_async:
      c.Cblock(self._GenerateFunctionResults(function.returns_async))
    c.Append('}  // namespace %s' % function_namespace)
    return c
def _GenerateFunction ( self , function ) : c = Code ( ) function_namespace = cpp_util . Classname ( function . name ) if function_namespace == 'SendMessage' : function_namespace = 'PassMessage' ( c . Append ( 'namespace %s {' % function_namespace ) . Append ( ) . Cblock ( self . _GenerateFunctionParams ( function ) ) ) if function . returns_async : c . Cblock ( self . _GenerateFunctionResults ( function . returns_async ) ) c . Append ( '}  // namespace %s' % function_namespace ) return c
Generates the namespaces and structs for a function.
Generates the namespaces and structs for a function .
"""Generates the namespaces and structs for a function.
    """ # TODO(kalman): Use function.unix_name not Classname here. # Windows has a #define for SendMessage, so to avoid any issues, we need # to not use the name.
self
function