Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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)
 
QQmlJS::SourceLocation sourceLocation () const
 
void setSourceLocation (QQmlJS::SourceLocation location)
 
QQmlJSMetaReturnType returnValue () const
 
void setReturnValue (const QQmlJSMetaReturnType returnValue)
 
QString returnTypeName () const
 
void setReturnTypeName (const QString &typeName)
 
QSharedPointer< const QQmlJSScopereturnType () const
 
void setReturnType (QWeakPointer< const QQmlJSScope > type)
 
QList< QQmlJSMetaParameterparameters () const
 
QPair< QList< QQmlJSMetaParameter >::iterator, QList< QQmlJSMetaParameter >::iterator > mutableParametersRange ()
 
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 191 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 212 of file qqmljsmetatypes_p.h.

◆ Access

Enumerator
Private 
Protected 
Public 

Definition at line 194 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 204 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 215 of file qqmljsmetatypes_p.h.

Member Function Documentation

◆ access()

Access QQmlJSMetaMethod::access ( ) const
inline

Definition at line 257 of file qqmljsmetatypes_p.h.

◆ addParameter()

void QQmlJSMetaMethod::addParameter ( const QQmlJSMetaParameter & p)
inline

Definition at line 252 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 282 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 303 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ isCloned()

bool QQmlJSMetaMethod::isCloned ( ) const
inline

Definition at line 262 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 265 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 274 of file qqmljsmetatypes_p.h.

◆ isJavaScriptFunction()

bool QQmlJSMetaMethod::isJavaScriptFunction ( ) const
inline

Definition at line 268 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 280 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 291 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ methodName()

QString QQmlJSMetaMethod::methodName ( ) const
inline

Definition at line 221 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 254 of file qqmljsmetatypes_p.h.

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

+ Here is the caller graph for this function:

◆ mutableParametersRange()

QPair< QList< QQmlJSMetaParameter >::iterator, QList< QQmlJSMetaParameter >::iterator > QQmlJSMetaMethod::mutableParametersRange ( )
inline

Definition at line 236 of file qqmljsmetatypes_p.h.

References QList< T >::begin(), and QList< T >::end().

+ Here is the call graph for this function:

◆ parameterNames()

QStringList QQmlJSMetaMethod::parameterNames ( ) const
inline

Definition at line 241 of file qqmljsmetatypes_p.h.

◆ parameters()

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

Definition at line 234 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 231 of file qqmljsmetatypes_p.h.

References QQmlJSMetaParameter::type().

+ Here is the call graph for this function:

◆ returnTypeName()

QString QQmlJSMetaMethod::returnTypeName ( ) const
inline

Definition at line 229 of file qqmljsmetatypes_p.h.

References QQmlJSMetaParameter::typeName().

+ Here is the call graph for this function:

◆ returnValue()

QQmlJSMetaReturnType QQmlJSMetaMethod::returnValue ( ) const
inline

Definition at line 227 of file qqmljsmetatypes_p.h.

Referenced by setReturnValue().

+ Here is the caller graph for this function:

◆ revision()

int QQmlJSMetaMethod::revision ( ) const
inline

Definition at line 259 of file qqmljsmetatypes_p.h.

◆ setAnnotations()

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

Definition at line 283 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 297 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ setIsCloned()

void QQmlJSMetaMethod::setIsCloned ( bool isCloned)
inline

Definition at line 263 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 266 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 275 of file qqmljsmetatypes_p.h.

◆ setIsJavaScriptFunction()

void QQmlJSMetaMethod::setIsJavaScriptFunction ( bool isJavaScriptFunction)
inline

Definition at line 269 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 285 of file qqmljsmetatypes_p.h.

References Q_ASSERT.

◆ setMethodName()

void QQmlJSMetaMethod::setMethodName ( const QString & name)
inline

Definition at line 222 of file qqmljsmetatypes_p.h.

◆ setMethodType()

void QQmlJSMetaMethod::setMethodType ( MethodType methodType)
inline

Definition at line 255 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 250 of file qqmljsmetatypes_p.h.

References parameters().

+ Here is the call graph for this function:

◆ setReturnType()

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

Definition at line 232 of file qqmljsmetatypes_p.h.

References QQmlJSMetaParameter::setType().

+ Here is the call graph for this function:

◆ setReturnTypeName()

void QQmlJSMetaMethod::setReturnTypeName ( const QString & typeName)
inline

Definition at line 230 of file qqmljsmetatypes_p.h.

References QQmlJSMetaParameter::setTypeName(), and typeName.

+ Here is the call graph for this function:

◆ setReturnValue()

void QQmlJSMetaMethod::setReturnValue ( const QQmlJSMetaReturnType returnValue)
inline

Definition at line 228 of file qqmljsmetatypes_p.h.

References returnValue().

+ Here is the call graph for this function:

◆ setRevision()

void QQmlJSMetaMethod::setRevision ( int r)
inline

Definition at line 260 of file qqmljsmetatypes_p.h.

◆ setSourceLocation()

void QQmlJSMetaMethod::setSourceLocation ( QQmlJS::SourceLocation location)
inline

Definition at line 225 of file qqmljsmetatypes_p.h.

◆ sourceLocation()

QQmlJS::SourceLocation QQmlJSMetaMethod::sourceLocation ( ) const
inline

Definition at line 224 of file qqmljsmetatypes_p.h.

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

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 317 of file qqmljsmetatypes_p.h.

◆ operator==

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

Definition at line 309 of file qqmljsmetatypes_p.h.

◆ qHash

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

Definition at line 322 of file qqmljsmetatypes_p.h.


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