.Page.dddoc
..hidefromindex
..summary:The documentation system "dot-dot-doc".
..description
...text:
Seqan uses its own documentation system, called "dot-dot-doc", or shortly "dddoc".
This document describes the documentation system.

...contents

...section:# General principles
...text:
The documentation can be viewed as a tree and is distributed over several files.
The files are either special dddoc files (ending in .dddoc) or C++ source code files.
(This page was written in a dddoc file). In C++ source code files one can introduce documentation
by using the special comments /** or ///.
The documentation is generated by a python script that searches all files for documentation
commands and builds from this a coherent documentation in HTML (for later a Pdf documentation is planned).
...text:
In the development environment, the documentation is built by calling "make.bat" (Windows) or "make.sh" (Linux) in the "docs"
directory. In both cases optional arguments
specify which modules are built, i.e. which subfolder of "application/library" should be scanned for documentation.
If no modul is specified then the complete
documentation is built. In order to build only the pages residing under "docs" one can specify as modul name
"static" (or any other name that is not a real modul). 
Note that indexes and menus are only created when the entire documentation is built, or if "indexonly" is specified instead of a real module name.
...text:
SeqAn is released with the complete documentation and the release does not include the dddoc python scripts.
...text:
Files that contain the string "SEQAN_NO_DDDOC" are not scanned for documentation, i.e. all documentation in the file is ignored. 

...section:# Notation
...text:
The documentation is stored as a dddoc tree.
Each node of this tree has a name.
The path from the root to another node in the tree is given by enumerating the corresponding names
of all nodes on the path separated using a ".". For example 
"animals.pets.dogs.wuffi".
Each node in a dddoc tree also contains one or more (possibly empty) pieces of text. 

...text:
The dddoc tree is defined by a set of entries.
Entries have the form ".[Path]:[Text]", while [Path] describes a node in the dddoc tree and [Text] a piece of text associated to that node.
Each entry has to start in a new line, that means the first character in the line is ".".
The text piece [Text] can span over multiple lines as long as these lines does not begin with a "." character.
If [Path] does not start with a dot, then it represends a complete path from the root of the ddoc tree to a node.
If [Path] starts with $n$ dots, then it is interpreted as a sub-path to the closest preceding entry with a [Path] starting with $n-1$ dots.
Informally spoken: "." plays the same role in dddoc as tabs in python.

...text:Example 1

...code:.animals.pets
\dot.dogs.my_dog
\dot..name:Snoopy
\dot..age:5
\dot.cats.my_cat
\dot..age:2

...text:The above is the same as:

...code:.animals.pets.dogs.my_dog.name.Snoopy
\dotanimals.pets.dogs.my_dog.age:5
\dotanimals.pets.cats.my_cat.age:2

...text:Example 2

...code:.address.name:Andreas D\"oring
\dot.comment:That is a comment,
 which contains several lines.
\dot.comment:This will be another comment.

...text:Example 3

...code:.Domainen."www.seqan.de":The SeqAn Homepage


...text:For clarification, we list here some terms that are used in this text:
...table:entity|A part of the documented C++ code, e.g. a class or a function.
...table:entry|Smallest meaningful part of documentation: Specifies a node within the dddoc tree and a piece of text for this node.
...table:item|A part of the documentation, e.g. the documentation of an entity. 
...table:field|Part of an item.
...table:subfield|Part of a field.


...section:# Entries
...text:
The documentation consists of a set of items.
For each C++ entity that is documented exists one item.
The path of an item has the form "[Category].[Name]", i.e. items correspond to subtrees of the dddoc tree and the roots of this subtrees have depth 2.

...text:
The text associated to the root node of an item is used as a description text, but it is encouraged to use text fields instead.
If several entries define text pieces for an item, these text pieces are concatenated.

...subsection:#.# Categories

...text:At the moment, dddoc supports the following item categories:
...table:"Page"|general content, e.g. tutorials etc.
...table:"Concept"|concepts
...table:"Class"|classes
...table:"Spec"|specializations
...table:"Shortcut"|shortcuts
...table:"Function"|(global) functions
...table:"Memfunc"|member functions
...table:"Memvar"|member variables
...table:"Metafunction"|meta functions
...table:"Tag"|tag
...table:"Adaption"|adapters
...table:"Demo"|examples programs

...text:In addition dddoc supports the following technical categories:        
...table:"Internal"|is used to document internal entities that should not belong to the official documentation of the library. 
Hence it is forbidden to introduce links from or to this category.
...table:"globals"|stores meta information and constants that are used for the generation of the documentation.
In addition it is used to define index pages for the individual categories.
    
...text:Sub-categories are specified using the "cat" field, see below.

...subsection:#.# Names

...text:The name of a category subnode is usually the name of the entity that is documented by this item, e.g. the C++-Function "length" is documented in the item "Function.length".
If it is desired, another name can be displayed
 by using the "title" field, see below.
...text: If the name contains a "#" character, then only the string after the (first) "#" character
is displayed. This should be used for Memfunc and Memvar items: write the class name
in front of the "#" and the member name after it. Instead of the "#" character the "\pipe" character can also be used.

...section:# Fields
...text:
Fields define the properties of an item.
In the dddoc tree, fields are subnotes of items.
A field has therefore the form "[Category].[Name].[Field]":


...subsection:#.# Special fields

...table:"title"|title of the page (optional). Default is [Name].
Text pieces defined by several entries for the same "title" field are concatenated.
...table:"summary"|Short summary of the item. Each item should have exactly one summary, otherwise a warning is displayed. Place longer descriptions under "remarks" or "description". 
Text pieces defined by several entries for the same "summary" field are concatenated.
...table:"cat"|subcategory. The text appears in the documentation in a subfolder of [Category]. Sub-subcategories can be defined by a "."-separated category path, 
    e.g. "cat:animal.rodents.hamsters".
each item can possess several subcategories. In this case the tex appears in all corresponding subfolders.
...table:"signature"|Isolated piece of code that demonstates the use of the item.
        for example: "$length(container)$"
...table:"file"|displays the source file if given the path to a .cpp file. Should be used only for demos.
All lines in the source file that start with a dddoc comment (e.g. "///") are displayed as an ordinary C++ comments.
...table:"hidefromindex"|Exlude item from indexes and menus. A page for this 
...table:"order"|the string is used instead of [Name] for sorting the items in indexes and menus.
Please note that numbers are parsed as text, hence
the entry "order:10" will be placed in front of "order:2".

...subsection:#.# Text fields
...text:Fields that define texts. The text can be structured using subfields.
Text pieces defined by several entries for the same text field are concatenated.
...table:"description"|descriptive text. Can be used for tutorials. 
...table:"example"|code examples.
...table:"include"|name of header file you have to include to use the entity.
...table:"output"|the output of a program. "code" subfields of this field will be displayed in a special console like style.
...table:"remarks"|comments.
...table:"returns"|return value. If several return values are given, the subfield "param" should be used after "return". 
    
...subsection:#.# Tables of text fields
...text:Child nodes below a table field are sorted alphabetically and printed in form of a table of text fields.
...table:"param"|argument. e.g. "param.length:length of a field". If a param does not appear in one of the item's signatures, a warning is displayed.
...table:"value"|Possible value an entity can take.
...table:"tag"|Possible tag type.
...table:"glossary"|Glossary entry. Glossary entries are displayed in alphabetic order. Should only be used in special glossary pages like @Page.Glossary|Page.Glossary@.

...subsection:#.# Link fields
...text:Link to other items. Most link fields automatically generate back links by creating new fields for the target item.
E.g. "Class.doc.base:Class.animal" creates a field "Class.animal.derived:Class.doc".
...table:"base"|link to class or spec. If Class or Spec: The base class. (inserts back link: "derived")
...table:"baseconcept"|link to a concept. Using Concept: the current item is a child concept that inherits all properties from the specified base concept, 
    i.e. a class that implements the child concept also implements the base concept. 
    (inserts back link: "childconcept")
...table:"class"|link to class or spec. Using Memfunc or Memvar: name of the class belonging to the item. 
(inserts links "memfunc" or "memvar")
...table:"concept"|link to concept. A class that implements this concept must implement the current item. Do not disturb with "implements". Insert back link depending on the current item's category.
...table:"demo"|link to a demo. Demo explains how to use the item. (inserts back link "demofor")
...table:"general"|for Spec: The correspnding class. (inserts back link "spec")
...table:"implements"|link to concept that is implemented by the current item. Do not disturb with "concept". (inserts back link "conceptimplements")
...table:"see"|crossreference to another item. (inserts back link "see").
...table:"shortcutfor"|link to another item, for which the current item is a shortcut for. (inserts back  link: "shortcut")

...text:
In addition, there are the following link fields. However, we discourage the user of dddoc to use them, since
these links can be set with the link field commands mentioned above: 
...table:"childconcept"|link to "baseconcept"
...table:"conceptfunc"| link to "concept"
...table:"conceptimplements"|link to "implements"
...table:"conceptmemfunc"| link to "concept"
...table:"conceptmemvar"| link to "concept"
...table:"conceptmetafunc"| link to "concept"
...table:"conceptusedby"| link to "concept"
...table:"demofor"|for demo: link to an item in a demo. (inserts back link "demo")
...table:"derived"|for class or spec: A specialisation.
...table:"function"|For class or spec: a function (is inserted as link by using "param.[Name].type", "returns.type" or "returns.[Name].type" in function
...table:"memfunc"|for class or spec: A member function.
...table:"memvar"|for class or spec: A member variable.
...table:"shortcut"|link to shortcut. (inserts back link "shortcutfor")
...table:"spec"|for class or spec: A specialisation.
...table:"type"|for class or spec: A meta function (is inserted as link by using "param.[Name].type" in Metafunktion


...section:# Subfields
...text:children nodes below text fields. 

...subsection:#.# Free subfields
...text:
Free subfields are output in the order they appear in the sources.
All other subfields are collected and displayed unter the corresponding subsection heading.
...table:"section"|inserts new section heading. The first occurence of the "#" character is replaced by a section number. 
example: "..section:#. My chapter"
...table:"subsection"|inserts heading for new subsection. If the heading contains exactly one "#" character
then it is replaced by the subsection number. Otherwise the dirst "#" character is replaced by the section number and the second "#" character by the subsection number.
examples: "..subsection:#.# Subsection", "..subsection:Example #"
...table:"contents"|builts a table of contents in which all sections and subsections of this field are displayed.
...table:"text"|a text paragraph.
...table:"note"|an emphasized text paragraph.
...table:"code"|example code.
...table:"output"|output of a program, displayed in a console like style.
...table:"image"|Inserts an image. Needed is the name (optinally with a relativ path) of the image (without extension). 
If the documentation is constructed in HTML then the extension ".png" is automatically appended.
Note that there should also be an ".eps" version of the image for LaTeX exports in the future.
\br
Images should be stored in the "img" folder. Optionally a caption can be given by using the"\pipe" command.
e.g. "..image:seqan_logo_large\pipe This is the large SeqAn logo.".
Should more images appear next to each other then one can specify the additional images with more "\pipe"
commands, e.g. "..image:file1\pipecaption1\pipefile2\pipecaption2\pipefile3\pipecaption3".
...table:"table"|displays a row of a table. The columns are separated using the "\pipe" command. 
Subsequent "table" and "tableheader" subfields are put  together in one table.
...table:"tableheader"|displays an emphasized table row (the columns contain the header text).
...table:"field"|displays a part of the documentation of another item, i.e. one field of this documentation. 
For example "field:Class.String.spec" displays a list of all specializations of the item "Class.String".
Note that this will generate redundancy, since the same information will be printed on the documentation page for "Class.String".
Consider to use a link to that item instead.

...subsection:#.# Text Subfields
...text:Text pieces defined by several entries for the same text subfield are concatenated.
...table:"value"|a value.
...table:"default"|default value.
...table:"remarks"|commentary or code.
    
...subsection:#.# Tables of text subfields
...table:"param"|list of parameters. Is used in conjunction with "returns" to list different return values.

...subsection:#.# Link subfields
...text:Link subfields link to other pages. 
To disable linking, use "nolink:" as a prefix.
For example, write "..type:nolink:unsinged int" to state that the type for a given param or return field is $unsigned int$.
...table:"metafunktion"|link to a meta function. For "param" or "return" fields e.g. to the meta function 
that yields the typ of the arguments or of the return values.
...table:"type"|link to a type (class, spec oder adapter). For "param" or "return" fields for example
the type of the arguments or of the return value (inserts link: "function" function, "type" for meta functions.)
...table:"concept"|link to a concept. Using in "param" fields: A concept that must be implemented by objects that are used as arguments. (inserts link: "conceptusedby")
...table:"see"|link to another item. (does not insert back link)
   

...section:# Formatting text
...text:
We allow LaTeX special characters in text (not in ID strings). e.g.  \\Sigma, \\in and \\leftarrow produce the
characters \Sigma, \in resp. \leftarrow. 
In this manner also european special characters can be inserted.
One can also use command characters reserved in dddoc. For example
\\dot, \\quote, \\at, \\pipe, \\dollar and \\backslash produce \dot, \quote, \at, \pipe, \dollar and \backslash.
A list with all available characters can be found in dddoc_html_trans.py.
...text:Other possibilities to special characters: \\\\ stands for \\, \dollar\dollar for \dollar.
...text:\\br inserts a manual line break.
...text:
If C++ code should be displayed within a text field or subfield, it should be placed between \dollar, e.g.: \dollarint x\dollar yields: $int x$.


...section:# Links
...text:
 Links to entries are written as follows: "[Category].[Name]", e.g. "Class.String" gives: "@Class.String@".
 Links to the overview page of a category as follows: "[Category]", e.g. "@Metafunction@".
 Links to external  URLs start with "http:" or "ftp:", e.g. "@http://www.seqan.de@".
...text:
 Links to glossary entries start with "glos:", e.g. "glos:Concept" gives: "@glos:Concept@". 
 Note that if there is no glossary entry that matches exact to the given string, an inexact search is performed, e.g. "glos:Concepts" and "glos:concept" will both 
 refer to the entry "glos:Concept".
...text:
 A link can also be turned back into a non-link by writing "nolink:" in front of it, e.g. "type:nolink:unsigned int".
...text:
 If another text should be displayed fr the link it can be appended using the "\pipe" character, 
 e.g. "Class.String\pipethe string classe" erzeugt: @Class.String|the string class@. 
 or "http://www.seqan.de\pipeLink to SeqAn Homepage" gives: @http://www.seqan.de|Link to SeqAn Homepage@.
 Optionally one can also write the display text of a link to an item
after an additional "." instead of a "|".
...text:
Within a text field/subfield one can insert links by placing them between  \at characters, e.g. "click \atClass.String.here\at!" gives: click  @Class.String.here@!

