⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sourcecode.html

📁 DelphiDoc is a program for automatic generation of documentation on a Delphi-Project. At the momen
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Language" content="en">
    <meta name="author" content="Gerold Veith">
    <meta name="description" content="Some remarks on the source code of JADD - Just Another DelphiDoc.">
    <meta name="keywords" content="Source Code, Compile, Compiling, DelphiDoc, KylixDoc, JADD, Just Another DelphiDoc, Delphi, Kylix, Documentation, HTML, RTF, TeX, LaTeX, PDF, Portable Document Format, XMI, UML, Diagram">
    <meta name="DC.Language" content="en">
    <title>
      Remarks on the Source Code of JADD - Just Another DelphiDoc
    </title>
  </head>
  <body lang="en">

    <p align=center>
<!-- local -->
      <a href="http://sourceforge.net/"><img
         src="sflogo.png"
         width="210" height="62" border="0" alt="SourceForge.net Logo"
         align="right"></a>
<!-- /local -->
<!-- public - -!
      <a href="http://sourceforge.net/"><img
         src="http://sourceforge.net/sflogo.php?group_id=113456&amp;type=5"
         width="210" height="62" border="0" alt="SourceForge.net Logo"
         align="right"></a>
<!- - /public -->
      Homepage: <a href="http://delphidoc.sourceforge.net/">http://delphidoc.sourceforge.net/</a><br>
      Project-Page: <a href="http://sourceforge.net/projects/delphidoc/">http://sourceforge.net/projects/delphidoc/</a><br>
    </p>
    <br clear="all">


    <h1>Remarks on the Source Code of JADD - Just Another
        <em>DelphiDoc</em></h1>

    <h2>Table of Contents</h2>
    <ul>
      <li><a href="#Compilers">Compilers</a> (Delphi Versions)</li>
      <li><a href="#Libraries">Release - Libraries</a></li>
      <li><a href="#Preparations">Preparations</a></li>
      <li><a href="#CompilerSymbols">Compiler Symbols</a></li>
      <li><a href="#Kylix"><em>Kylix</em></a></li>
      <li><a href="#FinalRemarks">Final Remarks</a></li>
    </ul>


    <h2><a name="Compilers">Compilers</a> (Delphi Versions)</h2>

    <p><em>DelphiDoc</em> should be able to be compiled under Delphi&nbsp;4 and
       newer versions and on Kylix&nbsp;3 (and probably newer versions, if
       there ever will be any). I compile with Delphi&nbsp;4 (with
       update&nbsp;3) and sometimes check with Delphi&nbsp;7 and
       Kylix&nbsp;3 - Open Edition.
       Because it compiles with Kylix I assume it won't have a problem with
       Delphi&nbsp;6, or at least not too many. But Delphi&nbsp;5 might have
       some problems because I use conditional compiling to implement features
       not available in Delphi&nbsp;4, so if a feature is also not available in
       Delphi&nbsp;5 you might have to change some <code>VER120</code> to
       <code>VER130</code>.</p>

    <p>And it can probably be adjusted for Delphi 3, there are only two pairs
       of <b>overload</b>ed methods, but I don't know, how often default
       parameters are used, also the type Cardinal is used more often. But it
       will get increasingly harder with each release because Delphi .NET
       does not support many things of the <i>normal</i> Delphis, and most
       times to get around this, features of Delphi 4+ have to be used. Still,
       <em>DelphiDoc</em> can't be compiled for .NET, and this will probably
       stay this way for some time.</p>

    <p>For not Delphi's (like
       <a href="http://www.freepascal.org/">FreePascal</a> or
       <a href="http://www.gnu-pascal.de/">GPC, the GNU Pascal Compiler</a>,
       but the latter won't probably work) I can't make any statements on the
       language, but in the actual parsing of the source code and generating
       of the documentation (also the command line client), I used only very
       few classes, an implementation of the classes <code>TStringList</code>
       (and its abstract base class <code>TStrings</code>) and
       <code>TList</code> should suffice.</p>

    <p><b>Warning</b>: This is no API! Parameters are not checked every time,
       you have to give sensible values or the error may occur later some time
       or you simply get a wrong result. There are some <code>assert</code>ions
       but they are not extensive nor complete.</p>

    <p>I've heard that the Delphi 6 compiler has some bugs, maybe there are
       updates/patches, so if you get the following error, please look for
       them. The compiler may abort with the
       "<code>Internal Error L1030</code>" when a dynamic array is declared in
       a function and the base type is also locally declared, i.e.:</p>

    <pre>
      <b>procedure</b> Something;
      <b>type</b>      TBaseType = ...;
      <b>var</b>       MyArray  :<b>array of</b> TBaseType;
      <b>begin</b>
      ...
    </pre>


    <h2><a name="Libraries">Release - Libraries</a></h2>

    <p>The release consists of four parts.</p>

    <ol>
      <li>A library to represent parsed pascal data, files and identifiers.
          Also supports its writing to and reading from files. It is located in
          the subdirectory <code>Idents</code>.</li>
      <li>A library to parse pascal source to the internal representation of
          the first library. It's mainly located in the subdirectory
          <code>Parser</code>.</li>
      <li>A library using the first one to generate documentation about the
          parsed data, mainly located in the subdirectory
          <code>Generator</code>.</li>
      <li>The programs to use these three libraries, in the directories
          <code>GUI</code>, respectively <code>Command</code>. Of course the
          libraries could be used for other things than just these
          programs.</li>
     </ol>


    <h2><a name="Preparations">Preparations</a></h2>

    <p>Before compiling <em>DelphiDoc</em> you should check two things,
       although they are now automatically set on each release.</p>

    <p>First, if you want to compile the GUI version (that's probable), please
       refer to the section below to define some compiler symbols.</p>

    <p>Second, the generated .dcu-files are redirected to a special directory
       to prevent problems when switching between the GUI- and the
       console-version. You should check that the used directory exists or
       you will get an error. Please create the directory directly in the
       directory with the <code>.dpr</code>-files. For the GUI-version it's
       name is &quot;z_dcus&quot; and for the console-version
       &quot;z_dcusCL&quot;.</p>




    <h2><a name="CompilerSymbols">Compiler Symbols</a></h2>

    <p>Before compiling you can define some compiler symbols.<br>
       You can disable the symbol <code>DEBUG</code> and the assertion to
       improve the performance.<br>
       You will probably need to define the compiler symbol
       <code>USENORMALSPINEDIT</code>. It will use the normal TSpinEdit
       components as shipped with Delphi, in both dialogs to edit the options
       of the generator of documentation, instead of some more advanced
       versions. These components are not ready for release, and probably will
       never be because they are quiet old (1998) and still not ready. The main
       problem is they are heavily base on the TSpinEdits, and those are of
       course copyrighted by Borland, so I can't really release them.<p>

    <p>You can define the compiler symbol <code>USESOURCECODEGRID</code> to use
       a different component to show the parsed source code with some syntax
       highlighting (although not a perfect one). Without it a component close
       to Delphi's editor will be used (of course in read-only mode). If the
       compiler symbol is defined, instead a modified version of a TDrawGrid
       will paint each line, this is always the case with Kylix, because the
       editor-like component is Windows-specific, and this in turn is the only
       reason the grid-component exists. The grid has two main flaws: no
       Copy'n'Paste, and only whole lines (i.e. whole cells) can be selected,
       so the column of an error etc. can not be highlighted.</p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -