Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
RelaxedTemplateDeclaration Struct Reference

#include <template_declaration.h>

Inheritance diagram for RelaxedTemplateDeclaration:
Collaboration diagram for RelaxedTemplateDeclaration:

Public Member Functions

QString to_qstring () const
QString to_qstring_multiline () const
QSet< QStringparameterNames () const
 Returns the set of all declared template parameter names.
QSet< QStringrequiredParameterNamesForFunctions () const
 Returns the set of template parameter names that are API-significant and should be documented for functions.
Public Member Functions inherited from TemplateDeclarationStorage
std::string to_std_string () const

Public Attributes

std::optional< std::string > requires_clause
Public Attributes inherited from TemplateDeclarationStorage
std::vector< RelaxedTemplateParameterparameters

Detailed Description

Definition at line 428 of file template_declaration.h.

Member Function Documentation

◆ parameterNames()

QSet< QString > RelaxedTemplateDeclaration::parameterNames ( ) const
inlinenodiscard

Returns the set of all declared template parameter names.

This extracts the name from each template parameter's valued_declaration. Parameters without names (such as unnamed template parameters) are not included in the returned set.

This is useful for documentation validation, allowing QDoc to verify that template parameters can be referenced using the \a command.

Definition at line 493 of file template_declaration.h.

◆ requiredParameterNamesForFunctions()

QSet< QString > RelaxedTemplateDeclaration::requiredParameterNamesForFunctions ( ) const
inlinenodiscard

Returns the set of template parameter names that are API-significant and should be documented for functions.

This includes only non-type template parameters (such as {int Size}) and template-template parameters, which carry meaning that isn't implied by function parameter types.

Type template parameters (such as {typename T}) are excluded because they typically serve to type function parameters, and documenting the function parameter implicitly covers the template parameter's role.

For class template parameters, use parameterNames() instead, as all template parameters are part of the class's primary API surface.

Definition at line 518 of file template_declaration.h.

◆ to_qstring()

QString RelaxedTemplateDeclaration::to_qstring ( ) const
inline

Definition at line 432 of file template_declaration.h.

References TemplateDeclarationStorage::to_std_string().

Here is the call graph for this function:

◆ to_qstring_multiline()

QString RelaxedTemplateDeclaration::to_qstring_multiline ( ) const
inline

Definition at line 460 of file template_declaration.h.

Member Data Documentation

◆ requires_clause

std::optional<std::string> RelaxedTemplateDeclaration::requires_clause

Definition at line 430 of file template_declaration.h.


The documentation for this struct was generated from the following file: