Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlJSMetaMethod Class Reference

#include <qqmljsmetatypes_p.h>

+ Collaboration diagram for QQmlJSMetaMethod:

Public Types

enum  Access { Private , Protected , Public }
 
enum class  RelativeFunctionIndex : int { Invalid = -1 }
 
enum class  AbsoluteFunctionIndex : int { Invalid = -1 }
 
using MethodType = QQmlJSMetaMethodType
 

Public Member Functions

 QQmlJSMetaMethod ()=default
 
 QQmlJSMetaMethod (QString name, QString returnType=QString())
 
QString methodName () const
 
void setMethodName (const QString &name)
 
QString returnTypeName () const
 
QSharedPointer< const QQmlJSScopereturnType () const
 
void setReturnTypeName (const QString &type)
 
void setReturnType (const QSharedPointer< const QQmlJSScope > &type)
 
QList< QQmlJSMetaParameterparameters () const
 
QStringList parameterNames () const
 
void setParameters (const QList< QQmlJSMetaParameter > &parameters)
 
void addParameter (const QQmlJSMetaParameter &p)
 
QQmlJSMetaMethodType methodType () const
 
void setMethodType (MethodType methodType)
 
Access access () const
 
int revision () const
 
void setRevision (int r)
 
bool isCloned () const
 
void setIsCloned (bool isCloned)
 
bool isConstructor () const
 
void setIsConstructor (bool isConstructor)
 
bool isJavaScriptFunction () const
 
void setIsJavaScriptFunction (bool isJavaScriptFunction)
 
bool isImplicitQmlPropertyChangeSignal () const
 
void setIsImplicitQmlPropertyChangeSignal (bool isPropertyChangeSignal)
 
bool isValid () const
 
const QVector< QQmlJSAnnotation > & annotations () const
 
void setAnnotations (QVector< QQmlJSAnnotation > annotations)
 
void setJsFunctionIndex (RelativeFunctionIndex index)
 
RelativeFunctionIndex jsFunctionIndex () const
 
void setConstructorIndex (RelativeFunctionIndex index)
 
RelativeFunctionIndex constructorIndex () const
 

Friends

bool operator== (const QQmlJSMetaMethod &a, const QQmlJSMetaMethod &b)
 
bool operator!= (const QQmlJSMetaMethod &a, const QQmlJSMetaMethod &b)
 
size_t qHash (const QQmlJSMetaMethod &method, size_t seed=0)
 

Detailed Description

Definition at line 180 of file qqmljsmetatypes_p.h.

Member Typedef Documentation

◆ MethodType

Member Enumeration Documentation

◆ AbsoluteFunctionIndex

enum class QQmlJSMetaMethod::AbsoluteFunctionIndex : int
strong

Represents an absolute JavaScript function/expression index pointing into the QV4::ExecutableCompilationUnit::runtimeFunctions array. Used as a typed alternative to int with an explicit invalid state.

Enumerator
Invalid 

Definition at line 201 of file qqmljsmetatypes_p.h.

◆ Access

Enumerator
Private 
Protected 
Public 

Definition at line 183 of file qqmljsmetatypes_p.h.

◆ RelativeFunctionIndex

enum class QQmlJSMetaMethod::RelativeFunctionIndex : int
strong

Represents a relative JavaScript function/expression index within a type in a QML document. Used as a typed alternative to int with an explicit invalid state.

Enumerator
Invalid 

Definition at line 193 of file qqmljsmetatypes_p.h.

Constructor & Destructor Documentation

◆ QQmlJSMetaMethod() [1/2]

QQmlJSMetaMethod::QQmlJSMetaMethod ( )
default

◆ QQmlJSMetaMethod() [2/2]

QQmlJSMetaMethod::QQmlJSMetaMethod ( QString  name,
QString  returnType = QString() 
)
inlineexplicit

Definition at line 204 of file qqmljsmetatypes_p.h.

Member Function Documentation

◆ access()

Access QQmlJSMetaMethod::access ( ) const
inline

Definition at line 239 of file qqmljsmetatypes_p.h.

◆ addParameter()

void QQmlJSMetaMethod::addParameter ( const QQmlJSMetaParameter p)
inline

Definition at line 234 of file qqmljsmetatypes_p.h.

References QList< T >::append().

+ Here is the call graph for this function:

◆ annotations()

const QVector< QQmlJSAnnotation > & QQmlJSMetaMethod::annotations ( ) const
inline

Definition at line 264 of file qqmljsmetatypes_p.h.

Referenced by setAnnotations().

+ Here is the caller graph for this function:

◆ constructorIndex()

RelativeFunctionIndex QQmlJSMetaMethod::constructorIndex ( ) const
inline

Definition at line 285 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ isCloned()

bool QQmlJSMetaMethod::isCloned ( ) const
inline

Definition at line 244 of file qqmljsmetatypes_p.h.

Referenced by setIsCloned().

+ Here is the caller graph for this function:

◆ isConstructor()

bool QQmlJSMetaMethod::isConstructor ( ) const
inline

Definition at line 247 of file qqmljsmetatypes_p.h.

Referenced by setIsConstructor().

+ Here is the caller graph for this function:

◆ isImplicitQmlPropertyChangeSignal()

bool QQmlJSMetaMethod::isImplicitQmlPropertyChangeSignal ( ) const
inline

Definition at line 256 of file qqmljsmetatypes_p.h.

◆ isJavaScriptFunction()

bool QQmlJSMetaMethod::isJavaScriptFunction ( ) const
inline

Definition at line 250 of file qqmljsmetatypes_p.h.

Referenced by setIsJavaScriptFunction().

+ Here is the caller graph for this function:

◆ isValid()

bool QQmlJSMetaMethod::isValid ( ) const
inline

Definition at line 262 of file qqmljsmetatypes_p.h.

References QString::isEmpty().

Referenced by QQmlJSTypeResolver::adjustTrackedType(), and QQmlJSTypeResolver::selectConstructor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jsFunctionIndex()

RelativeFunctionIndex QQmlJSMetaMethod::jsFunctionIndex ( ) const
inline

Definition at line 273 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ methodName()

QString QQmlJSMetaMethod::methodName ( ) const
inline

Definition at line 210 of file qqmljsmetatypes_p.h.

Referenced by QQmlSA::MethodPrivate::methodName().

+ Here is the caller graph for this function:

◆ methodType()

QQmlJSMetaMethodType QQmlJSMetaMethod::methodType ( ) const
inline

Definition at line 236 of file qqmljsmetatypes_p.h.

Referenced by QQmlSA::MethodPrivate::methodType(), and setMethodType().

+ Here is the caller graph for this function:

◆ parameterNames()

QStringList QQmlJSMetaMethod::parameterNames ( ) const
inline

Definition at line 223 of file qqmljsmetatypes_p.h.

Referenced by QQmlJSImportVisitor::visit().

+ Here is the caller graph for this function:

◆ parameters()

QList< QQmlJSMetaParameter > QQmlJSMetaMethod::parameters ( ) const
inline

Definition at line 221 of file qqmljsmetatypes_p.h.

Referenced by setParameters().

+ Here is the caller graph for this function:

◆ returnType()

QSharedPointer< const QQmlJSScope > QQmlJSMetaMethod::returnType ( ) const
inline

Definition at line 214 of file qqmljsmetatypes_p.h.

References QWeakPointer< T >::toStrongRef().

+ Here is the call graph for this function:

◆ returnTypeName()

QString QQmlJSMetaMethod::returnTypeName ( ) const
inline

Definition at line 213 of file qqmljsmetatypes_p.h.

◆ revision()

int QQmlJSMetaMethod::revision ( ) const
inline

Definition at line 241 of file qqmljsmetatypes_p.h.

◆ setAnnotations()

void QQmlJSMetaMethod::setAnnotations ( QVector< QQmlJSAnnotation annotations)
inline

Definition at line 265 of file qqmljsmetatypes_p.h.

References annotations().

+ Here is the call graph for this function:

◆ setConstructorIndex()

void QQmlJSMetaMethod::setConstructorIndex ( RelativeFunctionIndex  index)
inline

Definition at line 279 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ setIsCloned()

void QQmlJSMetaMethod::setIsCloned ( bool  isCloned)
inline

Definition at line 245 of file qqmljsmetatypes_p.h.

References isCloned().

+ Here is the call graph for this function:

◆ setIsConstructor()

void QQmlJSMetaMethod::setIsConstructor ( bool  isConstructor)
inline

Definition at line 248 of file qqmljsmetatypes_p.h.

References isConstructor().

+ Here is the call graph for this function:

◆ setIsImplicitQmlPropertyChangeSignal()

void QQmlJSMetaMethod::setIsImplicitQmlPropertyChangeSignal ( bool  isPropertyChangeSignal)
inline

Definition at line 257 of file qqmljsmetatypes_p.h.

◆ setIsJavaScriptFunction()

void QQmlJSMetaMethod::setIsJavaScriptFunction ( bool  isJavaScriptFunction)
inline

Definition at line 251 of file qqmljsmetatypes_p.h.

References isJavaScriptFunction().

+ Here is the call graph for this function:

◆ setJsFunctionIndex()

void QQmlJSMetaMethod::setJsFunctionIndex ( RelativeFunctionIndex  index)
inline

Definition at line 267 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ setMethodName()

void QQmlJSMetaMethod::setMethodName ( const QString name)
inline

Definition at line 211 of file qqmljsmetatypes_p.h.

◆ setMethodType()

void QQmlJSMetaMethod::setMethodType ( MethodType  methodType)
inline

Definition at line 237 of file qqmljsmetatypes_p.h.

References methodType().

+ Here is the call graph for this function:

◆ setParameters()

void QQmlJSMetaMethod::setParameters ( const QList< QQmlJSMetaParameter > &  parameters)
inline

Definition at line 232 of file qqmljsmetatypes_p.h.

References parameters().

+ Here is the call graph for this function:

◆ setReturnType()

void QQmlJSMetaMethod::setReturnType ( const QSharedPointer< const QQmlJSScope > &  type)
inline

Definition at line 216 of file qqmljsmetatypes_p.h.

◆ setReturnTypeName()

void QQmlJSMetaMethod::setReturnTypeName ( const QString type)
inline

Definition at line 215 of file qqmljsmetatypes_p.h.

◆ setRevision()

void QQmlJSMetaMethod::setRevision ( int  r)
inline

Definition at line 242 of file qqmljsmetatypes_p.h.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const QQmlJSMetaMethod a,
const QQmlJSMetaMethod b 
)
friend

Definition at line 300 of file qqmljsmetatypes_p.h.

◆ operator==

bool operator== ( const QQmlJSMetaMethod a,
const QQmlJSMetaMethod b 
)
friend

Definition at line 291 of file qqmljsmetatypes_p.h.

◆ qHash

size_t qHash ( const QQmlJSMetaMethod method,
size_t  seed = 0 
)
friend

Definition at line 305 of file qqmljsmetatypes_p.h.


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