parameters: (self, writer, class_desc)
docstring: Writes the implementation of the client API object allocator.
  
          By default, the allocator simply uses the global operator `new`
          to allocated client objects and returns it as an opaque pointer.
docstring_summary: Writes the implementation of the client API object allocator.
docstring_tokens: Writes the implementation of the client API object allocator .
function: def write_allocator_impl(self, writer, class_desc):
          """
          Writes the implementation of the client API object allocator.
  
          By default, the allocator simply uses the global operator `new`
          to allocated client objects and returns it as an opaque pointer.
          """
          allocator = self.get_allocator_name(class_desc)
          name = self.get_class_name(class_desc)
          writer.write('extern "C" void * {alloc}(void * impl) {{\n'.format(alloc=allocator))
          writer.indent()
          writer.write("return new {name}(impl);\n".format(name=name))
          writer.outdent()
          writer.write("}\n")
function_tokens: def write_allocator_impl ( self , writer , class_desc ) : allocator = self . get_allocator_name ( class_desc ) name = self . get_class_name ( class_desc ) writer . write ( 'extern "C" void * {alloc}(void * impl) {{\n' . format ( alloc = allocator ) ) writer . indent ( ) writer . write ( "return new {name}(impl);\n" . format ( name = name ) ) writer . outdent ( ) writer . write ( "}\n" )