Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
For example, suppose you derive your own classes from standard classes like TStrings, TPersistent, TObject etc. PasDoc has to internally know that TStrings actually descend from TPersistent in standard ObjectPascal RTL to generate perfect class hierarchy diagrams.
By default, we include in PasDoc a knowledge of the basic RTL classes. So things actually work out-of-the-box in simple cases, and you just enjoy nice class hierarchy diagrams :) But in more demanding cases, you may want to provide the hierarchy of external classes explicitly.
To make perfect class diagrams, ideally the PasDoc must know the class hierarchy of whole FreePascal / Delphi RTL, FCL, LCL, VCL and so on. Things are getting more difficult as different compiler libraries and their versions may have a little different inheritance. Ideally, every class library that you use (and do not let pasdoc parse it) may be described as "external class hierarchy" for PasDoc.
Provide your own file with class hierarchy by --external-class-hierarchy=file.txt command-line option. This reads the class hierarchy from a given file, and replaces the default pasdoc hierarchy (not only adds to it, to account for the fact that different compilers/versions may just want different hierarchy even for standard classes.) The file format is very simple, each line just specifies TChildClass=TParentClass.
The information about class ancestors from source files of course has precedence. So if the class is parsed by PasDoc, then the information about this class ancestor from external class hierarchy (PasDoc built-in or from given command-line file) is ignored.