def _generate_header(self, dest_dir='.', file_name=None):
      if file_name is None:
         file_name = 'RteApi.h'      
      self.includes.append((file_name, False))
      file_path = os.path.join(dest_dir,file_name)
      with io.open(file_path, 'w', newline='\n') as fp:
         header = C.hfile(file_path)
         self._write_header_includes(header.code)
         self._write_header_public_func(header.code)
         for line in header.lines():
            fp.write(line)
            fp.write('\n')
         fp.write('\n')