Template:dcl list todo
|- class="t-dcl-list-sep" | colspan="2" |
|- class="t-dcl-list-item"
| colspan="2" || This section is incomplete |
|-
|
|
This high-risk template has been protected from editing to prevent vandalism. Please discuss any changes on the talk page. |
This is one of the family of templates used for creation of declaration list. These templates should be used to design function, variable or type lists.
Contents |
List template families
- dcl list **** : For creation of member variable/function lists.
- ddcl list **** : For creation of detailed declaration lists (those including actual declaration code)
- sdcl list **** : For creation of lists representing various syntaxes of a language feature. Used in subpages of cpp/language
- param list **** : For creation of lists explaining function parameters.
- sb list **** : For creation of feature lists in navbars.
{{dcl list begin}}
- starts the declaration list
{{dcl list end}}
- ends the declaration list
{{dcl list h1| heading}}
- adds heading to the declaration list (h3 level)
{{dcl list h2| heading}}
- adds sub-heading to the declaration list (h5 level)
{{dcl list header}}
- adds explanation which header the features come from
- adds explanation which namespace the features are in
{{dcl list sep}}
- adds a separator
{{dcl list item| name| explanation}}
- adds a generic item to the declaration list. If explanation is omitted, the item spans through both columns.
{{dcl list hitem| name| explanation}}
- adds a highlighted item to the declaration list. If explanation is omitted, the item spans through both columns.
{{dcl list template| location| param1 (optional)| param2 (optional) ...}}
- Sets
dcl-list-template-namevariable to location, includes the template from location and unsets the variable. Use this template whenever copying dcl list items from a template; this will add an edit link to them. The unnamed parameters param1, param2, ... are passed to the template.
{{dcl list break}}
- breaks the columns. The width of the columns above does not depend on the content below and vice-versa.
{{dcl list todo| reason}}
- adds a todo item (similar to {{todo}})
Specialized templates
There are templates already specialized for most of the usage cases.
- Classes
{{dcl list class| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a class.
{{dcl list tclass| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a class template.
{{dcl list ptclass| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a class template specialization.
{{dcl list mem class| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a member class.
- Functions
{{dcl list fun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a function
{{dcl list tfun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a function template.
{{dcl list mem fun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a public member function.
{{dcl list prot mem fun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a protected member function template.
{{dcl list mem ctor| link| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a public constructor.
{{dcl list prot mem ctor| link| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a protected constructor.
{{dcl list mem dtor| link| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a public destructor.
{{dcl list prot mem dtor| link| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a protected destructor.
{{dcl list mem vdtor| link| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a virtual public destructor.
{{dcl list prot mem vdtor| link| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a virtual protected destructor.
{{dcl list mem sfun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a static member function.
{{dcl list mem vfun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a virtual public member function template.
{{dcl list prot mem vfun| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a virtual protected member function template.
{{dcl list macro fun| link| title=link title(optional)| notes=link notes(optional)| explanation}} - adds an item linking to a description of a function macro.
- Constants
{{dcl list macro const| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a macro constant.
{{dcl list const| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a global constant variable.
{{dcl list mem const| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a constant member variable.
{{dcl list mem sconst| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a static constant member variable.
- Objects
{{dcl list mem obj| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a member object.
{{dcl list prot mem obj| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a protected member object.
{{dcl list priv mem obj| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a private member object.
- Miscellaneous
{{dcl list typedef| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a typedef.
{{dcl list enum| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a enum or enum class.
{{dcl list concept| link| title=link title(optional)| notes=link notes(optional)| explanation}}
- adds an item linking to a description of a concept.
- Parameters
link
- this parameter controls the link target.
title=link title
- this parameter overrides the link title
notes=link notes
- this parameter adds text besides the link that is not the part of the link
explanation
- the explanation of the feature.
All templates accept nolink=true parameter. In that case no link is made, the formatting is the same.
The templates for member objects accept inlinemem=true parameter. This should be used if the functionality is described inline in the page of the class.
See also templates
Used in see also lists.
{{dcl list see cpp| location| nomono=true_if_serif (optional)| title1(optional)| title2(optional) ...}}
- adds a link to C++ documentation of a feature.
{{dcl list see c| location| nomono=true_if_serif (optional)| title1(optional)| title2(optional) ...}}
- adds a link to C documentation of a feature.
- Parameters
location
- this parameter controls the link target.
nomono
-
trueif serif font should be used for the title
title1, title2, ...
- this parameter overrides the title (default the title is guessed from location). Commas are placed between titles if several of them are provided.
Example
{{dcl list begin}}
{{dcl list h1 | Magic creatures}}
{{dcl list h2 | Dragon}}
{{dcl list header | dragon.h}}
{{dcl list fun | cpp/dragon/call_dragon | calls the dragon}}
{{dcl list fun | cpp/dragon/receive_fire | receives the fire}}
{{dcl list end}}
The above results in the following:
Magic creatures | |
Dragon | |
| Defined in header
<dragon.h> | |
| calls the dragon (function) | |
| receives the fire (function) | |
Templates used in the implementation
{{dcl member}}
{{dcl member| page| title (optional)| nolink=true_if_nolink (optional)| nobold=true_if_nobold (optional)| notes=notes (optional)}}
- Default title of the link is page. Custom title can be supplied via the second unnamed parameter or
titleparameter. Ifnolinkis true, no link is produced.
- Default font of the link is bold monospace. If
noboldis true, the font is normal serif.
- Additional notes to be placed in the right of the link can be passed through
notesparameter.
- Both
titleandnotescan accept <br> tags without breaking the layout.
{{dcl mark mem}}
{{dcl mark mem| link| mark_class| nomem=true_if_nomem (optional)| inlinemem=true_if_inlinemem (optional)}}
- Outputs
{{mark mark_class}}potentially appending additional description of the class the function/class is member of.
- Specifically, the template checks if the parent of the page linked to by
linkis a parent of the page the template is used in (i.e. they are siblings). For example, considerlink= a/b/c and page the page the template is used in. Then the template would append the additional description ifpageequals to z/z/z, or a/z, or a/b/z/z, but not if page is a/b/z or a/b.
- If
nomemis true then additional description is never appended.
- The template fetches information about the name of the parent class from a/b/title page.
- If
inlinememis true then the name of the parent class is fetched from a/b/c/title template. This is used when a class includes descriptions of its members inline.
{{dcl list editlink}}
- Outputs an [edit] text with a link pointing to a page for editing the template whose name is defined in
dcl-list-template-namevariable. At least one dummy parameter must be passed to this template, as Mediawiki software employs some optimizations that break the implementation.
| The above documentation is transcluded from Template:dcl list/doc. (edit | history) Subpages of this template. |