abstractmetalang.h | abstractmetalang.h | |||
---|---|---|---|---|
skipping to change at line 86 | skipping to change at line 86 | |||
}; | }; | |||
typedef QList<AbstractMetaField *> AbstractMetaFieldList; | typedef QList<AbstractMetaField *> AbstractMetaFieldList; | |||
typedef QList<AbstractMetaArgument *> AbstractMetaArgumentList; | typedef QList<AbstractMetaArgument *> AbstractMetaArgumentList; | |||
typedef QList<AbstractMetaFunction *> AbstractMetaFunctionList; | typedef QList<AbstractMetaFunction *> AbstractMetaFunctionList; | |||
class APIEXTRACTOR_API AbstractMetaClassList : public QList<AbstractMetaCl ass *> | class APIEXTRACTOR_API AbstractMetaClassList : public QList<AbstractMetaCl ass *> | |||
{ | { | |||
public: | public: | |||
AbstractMetaClass *findClass(const QString &name) const; | AbstractMetaClass *findClass(const QString &name) const; | |||
AbstractMetaClass *findClass(const TypeEntry* typeEntry) const; | ||||
AbstractMetaEnumValue *findEnumValue(const QString &string) const; | AbstractMetaEnumValue *findEnumValue(const QString &string) const; | |||
AbstractMetaEnum *findEnum(const EnumTypeEntry *entry) const; | AbstractMetaEnum *findEnum(const EnumTypeEntry *entry) const; | |||
}; | }; | |||
class APIEXTRACTOR_API AbstractMetaAttributes | class APIEXTRACTOR_API AbstractMetaAttributes | |||
{ | { | |||
public: | public: | |||
AbstractMetaAttributes() : m_attributes(0) {}; | AbstractMetaAttributes() : m_attributes(0), m_originalAttributes(0) {}; | |||
enum Attribute { | enum Attribute { | |||
None = 0x00000000, | None = 0x00000000, | |||
Private = 0x00000001, | Private = 0x00000001, | |||
Protected = 0x00000002, | Protected = 0x00000002, | |||
Public = 0x00000004, | Public = 0x00000004, | |||
Friendly = 0x00000008, | Friendly = 0x00000008, | |||
Visibility = 0x0000000f, | Visibility = 0x0000000f, | |||
skipping to change at line 1417 | skipping to change at line 1418 | |||
inline AbstractMetaFunctionList cppInconsistentFunctions() const; | inline AbstractMetaFunctionList cppInconsistentFunctions() const; | |||
inline AbstractMetaFunctionList cppSignalFunctions() const; | inline AbstractMetaFunctionList cppSignalFunctions() const; | |||
AbstractMetaFunctionList publicOverrideFunctions() const; | AbstractMetaFunctionList publicOverrideFunctions() const; | |||
AbstractMetaFunctionList virtualOverrideFunctions() const; | AbstractMetaFunctionList virtualOverrideFunctions() const; | |||
AbstractMetaFunctionList virtualFunctions() const; | AbstractMetaFunctionList virtualFunctions() const; | |||
AbstractMetaFunctionList nonVirtualShellFunctions() const; | AbstractMetaFunctionList nonVirtualShellFunctions() const; | |||
AbstractMetaFunctionList implicitConversions() const; | AbstractMetaFunctionList implicitConversions() const; | |||
/** | /** | |||
* Retrieves all class' operator overloads that meet | * Retrieves all class' operator overloads that meet | |||
* query crieteria defined with the OperatorQueryOption | * query criteria defined with the OperatorQueryOption | |||
* enum. | * enum. | |||
* /param query composition of OperatorQueryOption enum values | * /param query composition of OperatorQueryOption enum values | |||
* /return list of operator overload methods that meet the | * /return list of operator overload methods that meet the | |||
* query criteria | * query criteria | |||
*/ | */ | |||
AbstractMetaFunctionList operatorOverloads(uint query = AllOperators) c onst; | AbstractMetaFunctionList operatorOverloads(uint query = AllOperators) c onst; | |||
bool hasOperatorOverload() const; | bool hasOperatorOverload() const; | |||
bool hasArithmeticOperatorOverload() const; | bool hasArithmeticOperatorOverload() const; | |||
bool hasBitwiseOperatorOverload() const; | bool hasBitwiseOperatorOverload() const; | |||
skipping to change at line 1752 | skipping to change at line 1753 | |||
void setGreaterThanEqFunctions(const AbstractMetaFunctionList &lst) | void setGreaterThanEqFunctions(const AbstractMetaFunctionList &lst) | |||
{ | { | |||
m_greaterThanEqFunctions = lst; | m_greaterThanEqFunctions = lst; | |||
} | } | |||
AbstractMetaFunctionList greaterThanEqFunctions() const | AbstractMetaFunctionList greaterThanEqFunctions() const | |||
{ | { | |||
return m_greaterThanEqFunctions; | return m_greaterThanEqFunctions; | |||
} | } | |||
/// Returns a list of conversion operators for this class. The conversi | ||||
on operators are defined in other classes of the same module. | ||||
AbstractMetaFunctionList externalConversionOperators() const | ||||
{ | ||||
return m_externalConversionOperators; | ||||
} | ||||
/// Adds a converter operator for this class. | ||||
void addExternalConversionOperator(AbstractMetaFunction* conversionOp) | ||||
{ | ||||
if (!m_externalConversionOperators.contains(conversionOp)) | ||||
m_externalConversionOperators.append(conversionOp); | ||||
} | ||||
/// Returns true if this class has any converter operators defined else | ||||
where. | ||||
bool hasExternalConversionOperators() const | ||||
{ | ||||
return !m_externalConversionOperators.isEmpty(); | ||||
} | ||||
void sortFunctions(); | void sortFunctions(); | |||
const AbstractMetaClass *templateBaseClass() const | const AbstractMetaClass *templateBaseClass() const | |||
{ | { | |||
return m_templateBaseClass; | return m_templateBaseClass; | |||
} | } | |||
void setTemplateBaseClass(const AbstractMetaClass *cls) | void setTemplateBaseClass(const AbstractMetaClass *cls) | |||
{ | { | |||
m_templateBaseClass = cls; | m_templateBaseClass = cls; | |||
skipping to change at line 1822 | skipping to change at line 1840 | |||
QList<QPropertySpec *> m_propertySpecs; | QList<QPropertySpec *> m_propertySpecs; | |||
AbstractMetaFunctionList m_equalsFunctions; | AbstractMetaFunctionList m_equalsFunctions; | |||
AbstractMetaFunctionList m_nequalsFunctions; | AbstractMetaFunctionList m_nequalsFunctions; | |||
AbstractMetaClassList m_innerClasses; | AbstractMetaClassList m_innerClasses; | |||
AbstractMetaFunctionList m_lessThanFunctions; | AbstractMetaFunctionList m_lessThanFunctions; | |||
AbstractMetaFunctionList m_greaterThanFunctions; | AbstractMetaFunctionList m_greaterThanFunctions; | |||
AbstractMetaFunctionList m_lessThanEqFunctions; | AbstractMetaFunctionList m_lessThanEqFunctions; | |||
AbstractMetaFunctionList m_greaterThanEqFunctions; | AbstractMetaFunctionList m_greaterThanEqFunctions; | |||
AbstractMetaFunctionList m_externalConversionOperators; | ||||
QStringList m_baseClassNames; | QStringList m_baseClassNames; | |||
QList<TypeEntry *> m_templateArgs; | QList<TypeEntry *> m_templateArgs; | |||
ComplexTypeEntry *m_typeEntry; | ComplexTypeEntry *m_typeEntry; | |||
// FunctionModelItem m_qDebugStreamFunction; | // FunctionModelItem m_qDebugStreamFunction; | |||
bool m_stream; | bool m_stream; | |||
}; | }; | |||
class QPropertySpec | class QPropertySpec | |||
{ | { | |||
End of changes. 5 change blocks. | ||||
2 lines changed or deleted | 24 lines changed or added | |||
typesystem.h | typesystem.h | |||
---|---|---|---|---|
skipping to change at line 506 | skipping to change at line 506 | |||
{ | { | |||
return m_arguments; | return m_arguments; | |||
} | } | |||
/// Returns true if this is a constant method. | /// Returns true if this is a constant method. | |||
bool isConstant() const | bool isConstant() const | |||
{ | { | |||
return m_isConst; | return m_isConst; | |||
} | } | |||
/// Set this method static. | ||||
void setStatic(bool value) | ||||
{ | ||||
m_isStatic = value; | ||||
} | ||||
/// Returns true if this is a static method. | ||||
bool isStatic() const | ||||
{ | ||||
return m_isStatic; | ||||
} | ||||
private: | private: | |||
QString m_name; | QString m_name; | |||
Access m_access; | Access m_access; | |||
QList<TypeInfo> m_arguments; | QList<TypeInfo> m_arguments; | |||
TypeInfo m_returnType; | TypeInfo m_returnType; | |||
bool m_isConst; | bool m_isConst; | |||
bool m_isStatic; | ||||
}; | }; | |||
typedef QList<AddedFunction> AddedFunctionList; | typedef QList<AddedFunction> AddedFunctionList; | |||
struct ExpensePolicy | struct ExpensePolicy | |||
{ | { | |||
ExpensePolicy() : limit(-1) {} | ExpensePolicy() : limit(-1) {} | |||
int limit; | int limit; | |||
QString cost; | QString cost; | |||
bool isValid() const | bool isValid() const | |||
{ | { | |||
skipping to change at line 1045 | skipping to change at line 1057 | |||
} | } | |||
/** | /** | |||
* Finds the most basic primitive type that the typedef represents, | * Finds the most basic primitive type that the typedef represents, | |||
* i.e. a type that is not an alias. | * i.e. a type that is not an alias. | |||
* /return the most basic non-aliased primitive type represented | * /return the most basic non-aliased primitive type represented | |||
* by this typedef | * by this typedef | |||
*/ | */ | |||
PrimitiveTypeEntry* basicAliasedTypeEntry() const; | PrimitiveTypeEntry* basicAliasedTypeEntry() const; | |||
QString javaObjectFullName() const | ||||
{ | ||||
return javaObjectPackage() + "." + javaObjectName(); | ||||
} | ||||
QString javaObjectName() const; | ||||
QString javaObjectPackage() const; | ||||
virtual bool preferredConversion() const | virtual bool preferredConversion() const | |||
{ | { | |||
return m_preferredConversion; | return m_preferredConversion; | |||
} | } | |||
virtual void setPreferredConversion(bool b) | virtual void setPreferredConversion(bool b) | |||
{ | { | |||
m_preferredConversion = b; | m_preferredConversion = b; | |||
} | } | |||
virtual bool preferredTargetLangType() const | virtual bool preferredTargetLangType() const | |||
skipping to change at line 1881 | skipping to change at line 1886 | |||
TemplateEntry *findTemplate(const QString &name) | TemplateEntry *findTemplate(const QString &name) | |||
{ | { | |||
return m_templates[name]; | return m_templates[name]; | |||
} | } | |||
void addTemplate(TemplateEntry *t) | void addTemplate(TemplateEntry *t) | |||
{ | { | |||
m_templates[t->name()] = t; | m_templates[t->name()] = t; | |||
} | } | |||
AddedFunctionList addedFunctions() const | AddedFunctionList globalUserFunctions() const | |||
{ | { | |||
return m_addedFunctions; | return m_globalUserFunctions; | |||
} | } | |||
void setAddedFunctions(const AddedFunctionList& addedFunctions) | void addGlobalUserFunctions(const AddedFunctionList& functions) | |||
{ | { | |||
m_addedFunctions = addedFunctions; | m_globalUserFunctions << functions; | |||
} | } | |||
AddedFunctionList findAddedFunctions(const QString& name) const; | AddedFunctionList findGlobalUserFunctions(const QString& name) const; | |||
void setFunctionModifications(const FunctionModificationList& functionM odifications) | void addGlobalUserFunctionModifications(const FunctionModificationList& functionModifications) | |||
{ | { | |||
m_functionMods = functionModifications; | m_functionMods << functionModifications; | |||
} | } | |||
void addFunctionModification(const FunctionModification& functionModifi cation) | void addGlobalUserFunctionModification(const FunctionModification& func tionModification) | |||
{ | { | |||
m_functionMods << functionModification; | m_functionMods << functionModification; | |||
} | } | |||
FunctionModificationList functionModifications(const QString& signature ) const; | FunctionModificationList functionModifications(const QString& signature ) const; | |||
void setSuppressWarnings(bool on) | void setSuppressWarnings(bool on) | |||
{ | { | |||
m_suppressWarnings = on; | m_suppressWarnings = on; | |||
} | } | |||
void addSuppressedWarning(const QString &s) | void addSuppressedWarning(const QString &s) | |||
skipping to change at line 1957 | skipping to change at line 1962 | |||
bool parseFile(const QString &filename, bool generate = true); | bool parseFile(const QString &filename, bool generate = true); | |||
bool parseFile(QIODevice* device, bool generate = true); | bool parseFile(QIODevice* device, bool generate = true); | |||
private: | private: | |||
bool m_suppressWarnings; | bool m_suppressWarnings; | |||
TypeEntryHash m_entries; | TypeEntryHash m_entries; | |||
SingleTypeEntryHash m_flagsEntries; | SingleTypeEntryHash m_flagsEntries; | |||
TemplateEntryHash m_templates; | TemplateEntryHash m_templates; | |||
QStringList m_suppressedWarnings; | QStringList m_suppressedWarnings; | |||
AddedFunctionList m_addedFunctions; | AddedFunctionList m_globalUserFunctions; | |||
FunctionModificationList m_functionMods; | FunctionModificationList m_functionMods; | |||
QStringList m_requiredTargetImports; | QStringList m_requiredTargetImports; | |||
QStringList m_typesystemPaths; | QStringList m_typesystemPaths; | |||
QHash<QString, bool> m_parsedTypesystemFiles; | QHash<QString, bool> m_parsedTypesystemFiles; | |||
QList<TypeRejection> m_rejections; | QList<TypeRejection> m_rejections; | |||
QStringList m_rebuildClasses; | QStringList m_rebuildClasses; | |||
}; | }; | |||
End of changes. 12 change blocks. | ||||
16 lines changed or deleted | 21 lines changed or added | |||