From 2c860a30499ac1517706f247662598406dbcbd8e Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 21 Oct 2009 16:18:42 -0300 Subject: Added documentation for the new class "AddedFunction" Reviewed by Marcelo Lira --- typesystem.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'typesystem.h') diff --git a/typesystem.h b/typesystem.h index 9038b22a6..496515c63 100644 --- a/typesystem.h +++ b/typesystem.h @@ -442,13 +442,26 @@ struct FieldModification: public Modification typedef QList FieldModificationList; +/** +* \internal +* Struct used to store information about functions added by the typesystem. +* This info will be used later to create a fake AbstractMetaFunction which +* will be inserted into the right AbstractMetaClass. +*/ struct AddedFunction { + /// Function access types. enum Access { Protected = 0x1, Public = 0x2 }; + /** + * \internal + * Internal struct used to store information about arguments and return type of the + * functions added by the type system. This information is later used to create + * AbstractMetaType and AbstractMetaArgument for the AbstractMetaFunctions. + */ struct TypeInfo { TypeInfo() : isConstant(false), indirections(0), isReference(false) {} QString name; @@ -458,33 +471,40 @@ struct AddedFunction QString defaultValue; }; + /// Creates a new AddedFunction with a signature and a return type. AddedFunction(QString signature, QString returnType); + /// Returns the function name. QString name() const { return m_name; } + /// Set the function access type. void setAccess(Access access) { m_access = access; } + /// Returns the function access type. Access access() const { return m_access; } + /// Returns the function return type. TypeInfo returnType() const { return m_returnType; } + /// Returns a list of argument type infos. QList arguments() const { return m_arguments; } + /// Returns true if this is a constant method. bool isConstant() const { return m_isConst; -- cgit v1.2.3