logo

class

docCompiler::ApiToHtml

sys::Obj
  docCompiler::DocCompilerSupport
    docCompiler::ApiToHtml
  1  //
  2  // Copyright (c) 2007, Brian Frank and Andy Frank
  3  // Licensed under the Academic Free License version 3.0
  4  //
  5  // History:
  6  //   5 May 07  Brian Frank  Creation
  7  //
  8  
  9  using compiler
 10  
 11  **
 12  ** ApiToHtml generates an HTML file for each type in pod
 13  **
 14  class ApiToHtml : DocCompilerSupport
 15  {
 16  
 17    new make(DocCompiler compiler)
 18      : super(compiler)
 19    {
 20    }
 21  
 22    Void run()
 23    {
 24      compiler.pod.types.each |Type t|
 25      {
 26        if (!HtmlGenerator.showType(t)) return
 27        generate(t)
 28      }
 29    }
 30  
 31    Void generate(Type t)
 32    {
 33      log.debug("  API [$t]")
 34      file := compiler.podDir + "${t.name}.html".toUri
 35      loc := Location.make(t.qname)
 36      compiler.curType = t
 37      ApiToHtmlGenerator.make(compiler, loc, file.out, t).generate
 38      compiler.curType = null
 39    }
 40  }

More Info

Slots