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
IR::ParameterIR Struct Reference

Intermediate representation of a function parameter. More...

#include <member.h>

Collaboration diagram for IR::ParameterIR:

Public Member Functions

QJsonObject toJson () const
 \variable IR::ParameterIR::type Parameter type (such as "const QString &").

Public Attributes

QString type
QString name
QString defaultValue

Detailed Description

Intermediate representation of a function parameter.

ParameterIR captures the type, name, and optional default value of a single function parameter. Templates use this to render parameter lists in function synopses.

JSON output omits defaultValue when the string is empty, following the convention of suppressing absent optional fields.

Definition at line 20 of file member.h.

Member Function Documentation

◆ toJson()

QJsonObject IR::ParameterIR::toJson ( ) const
nodiscard

\variable IR::ParameterIR::type Parameter type (such as "const QString &").

\variable IR::ParameterIR::name Parameter name.

\variable IR::ParameterIR::defaultValue Default value expression, empty if none.

Converts the parameter to a QJsonObject for template rendering.

Always emits type and name. The defaultValue key is omitted when the default value string is empty.

Definition at line 49 of file member.cpp.

Member Data Documentation

◆ defaultValue

QString IR::ParameterIR::defaultValue

Definition at line 23 of file member.h.

◆ name

QString IR::ParameterIR::name

Definition at line 22 of file member.h.

Referenced by testing.tools.encode_pdf_filter._PdfStream::RegisterByName().

◆ type

QString IR::ParameterIR::type

Definition at line 21 of file member.h.


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