المتغيرات
فضاءات التسمية
أفعال

قالب:dcl list prot mem fun

من cppreference.com

|- | colspan="2" class="t-dcl-list-sep" |

|- class="t-dcl-list-item" | no member given |
(protected member function) |-

[edit] [{{purge}}] Template documentation

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.

محتويات

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 sidebars.

{{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

{{dcl list namespace}}

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) ...}}

includes a template from location. It only invokes {{location| param1| param2 ...}}. Unnamed parameters are passed to the source template. The source template itself should consist from {{dcl list ...}} items. ‎dcl-list-template-name‎ variable is set to location before the inclusion and unset afterwards.

{{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(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a class.

{{dcl list tclass| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a class template.

{{dcl list ptclass| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a class template specialization.

{{dcl list mem class| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a member class.
Functions

{{dcl list fun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a function

{{dcl list tfun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a function template.

{{dcl list mem fun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a public member function.

{{dcl list prot mem fun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a protected member function template.

{{dcl list mem ctor| link| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a public constructor.

{{dcl list prot mem ctor| link| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a protected constructor.

{{dcl list mem dtor| link| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a public destructor.

{{dcl list prot mem dtor| link| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a protected destructor.

{{dcl list mem vdtor| link| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a virtual public destructor.

{{dcl list prot mem vdtor| link| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a virtual protected destructor.

{{dcl list mem sfun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a static member function.

{{dcl list mem vfun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a virtual public member function template.

{{dcl list prot mem vfun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a virtual protected member function template.

{{dcl list macro fun| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}} - adds an item linking to a description of a function macro.

Constants

{{dcl list macro const| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a macro constant.

{{dcl list const| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a global constant variable.

{{dcl list mem const| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a constant member variable.

{{dcl list mem sconst| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a static constant member variable.
Objects

{{dcl list mem obj| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a member object.

{{dcl list prot mem obj| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a protected member object.

{{dcl list priv mem obj| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a private member object.
Miscellaneous

{{dcl list typedef| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a typedef.

{{dcl list enum| link| title=link title(اختياري)| notes=link notes(اختياري)| explanation}}

adds an item linking to a description of a enum or enum class.

{{dcl list concept| link| title=link title(اختياري)| notes=link notes(اختياري)| 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, however the formatting is the same.

[تعديل] See also templates

Used in see also lists.

{{dcl list see cpp| location| nomono=‎true_if_serif‎ (اختياري)| title1(اختياري)| title2(اختياري) ...}}

adds a link to C++ documentation of a feature.

{{dcl list see c| location| nomono=‎true_if_serif‎ (اختياري)| title1(اختياري)| title2(اختياري) ...}}

adds a link to C documentation of a feature.
Parameters

location

this parameter controls the link target.

nomono

‎true‎ if 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
معرف في ملف <dragon.h>
calls the dragon
(دالة)
receives the fire
(دالة)

[تعديل] Templates used in the implementation

[تعديل] {{dcl member}}

{{dcl member| page| title (اختياري)| nolink=true_if_nolink (اختياري)| nobold=true_if_nobold (اختياري)| notes=notes (اختياري)}}

Default title of the link is page. Custom title can be supplied via the second unnamed parameter or ‎title‎ parameter. If ‎nolink‎ is true, no link is produced.
Default font of the link is bold monospace. If ‎nobold‎ is true, the font is normal serif.
Additional notes to be placed in the right of the link can be passed through ‎notes‎ parameter.
Both ‎title‎ and ‎notes‎ can accept <br> tags without breaking the layout.

[تعديل] {{dcl mark mem}}

{{dcl mark mem| link| mark_class| nomem=true_if_nomem (اختياري)}}

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 ‎link‎ is a parent of the page the template is used in (i.e. they are siblings). For example, consider ‎link‎ = a/b/c and page the page the template is used in. Then the template would append the additional description if ‎page‎ equals to a/z, or b/z/z or a/b/z/z, but not if page is a/b/z.
If ‎nomem‎ is true then additional description is never appended.
The template fetches information about the name of the parent class from a/b/title page.