abstractmetalang.h   abstractmetalang.h 
skipping to change at line 32 skipping to change at line 32
*/ */
#ifndef ABSTRACTMETALANG_H #ifndef ABSTRACTMETALANG_H
#define ABSTRACTMETALANG_H #define ABSTRACTMETALANG_H
#include "typesystem.h" #include "typesystem.h"
#include <QtCore/QSet> #include <QtCore/QSet>
#include <QtCore/QStringList> #include <QtCore/QStringList>
#include <QtCore/QTextStream> #include <QtCore/QTextStream>
#include <QSharedPointer>
class AbstractMeta; class AbstractMeta;
class AbstractMetaClass; class AbstractMetaClass;
class AbstractMetaField; class AbstractMetaField;
class AbstractMetaFunction; class AbstractMetaFunction;
class AbstractMetaType; class AbstractMetaType;
class AbstractMetaVariable; class AbstractMetaVariable;
class AbstractMetaArgument; class AbstractMetaArgument;
class AbstractMetaEnumValue; class AbstractMetaEnumValue;
class AbstractMetaEnum; class AbstractMetaEnum;
skipping to change at line 292 skipping to change at line 293
{ {
return m_doc; return m_doc;
} }
private: private:
uint m_attributes; uint m_attributes;
uint m_originalAttributes; uint m_originalAttributes;
Documentation m_doc; Documentation m_doc;
}; };
typedef QList<AbstractMetaType*> AbstractMetaTypeList;
class APIEXTRACTOR_API AbstractMetaType class APIEXTRACTOR_API AbstractMetaType
{ {
public: public:
enum TypeUsagePattern { enum TypeUsagePattern {
InvalidPattern, InvalidPattern,
PrimitivePattern, PrimitivePattern,
FlagsPattern, FlagsPattern,
EnumPattern, EnumPattern,
ValuePattern, ValuePattern,
StringPattern, StringPattern,
CharPattern, CharPattern,
ObjectPattern, ObjectPattern,
QObjectPattern, QObjectPattern,
skipping to change at line 315 skipping to change at line 318
ValuePointerPattern, ValuePointerPattern,
NativePointerPattern, NativePointerPattern,
ContainerPattern, ContainerPattern,
VariantPattern, VariantPattern,
VarargsPattern, VarargsPattern,
JObjectWrapperPattern, JObjectWrapperPattern,
ArrayPattern, ArrayPattern,
ThreadPattern ThreadPattern
}; };
AbstractMetaType() : AbstractMetaType();
m_typeEntry(0), ~AbstractMetaType();
m_arrayElementCount(0),
m_arrayElementType(0),
m_originalTemplateType(0),
m_pattern(InvalidPattern),
m_constant(false),
m_reference(false),
m_cppInstantiation(true),
m_indirections(0),
m_reserved(0)
{}
QString package() const QString package() const
{ {
return m_typeEntry->targetLangPackage(); return m_typeEntry->targetLangPackage();
} }
QString name() const QString name() const
{ {
return QString(m_typeEntry->targetLangName()).split("::").last(); return QString(m_typeEntry->targetLangName()).split("::").last();
} }
QString fullName() const QString fullName() const
skipping to change at line 355 skipping to change at line 348
TypeUsagePattern typeUsagePattern() const TypeUsagePattern typeUsagePattern() const
{ {
return m_pattern; return m_pattern;
} }
// true when use pattern is container // true when use pattern is container
bool hasInstantiations() const bool hasInstantiations() const
{ {
return !m_instantiations.isEmpty(); return !m_instantiations.isEmpty();
} }
void addInstantiation(AbstractMetaType *inst)
void addInstantiation(AbstractMetaType* inst, bool owner = false)
{ {
if (owner)
m_children << inst;
m_instantiations << inst; m_instantiations << inst;
} }
void setInstantiations(const QList<AbstractMetaType *> &insts)
void setInstantiations(const AbstractMetaTypeList &insts, bool owner =
false)
{ {
m_instantiations = insts; m_instantiations = insts;
if (owner) {
m_children.clear();
m_children = insts;
}
} }
QList<AbstractMetaType *> instantiations() const
AbstractMetaTypeList instantiations() const
{ {
return m_instantiations; return m_instantiations;
} }
void setInstantiationInCpp(bool incpp) void setInstantiationInCpp(bool incpp)
{ {
m_cppInstantiation = incpp; m_cppInstantiation = incpp;
} }
bool hasInstantiationInCpp() const bool hasInstantiationInCpp() const
{ {
return hasInstantiations() && m_cppInstantiation; return hasInstantiations() && m_cppInstantiation;
} }
QString minimalSignature() const; QString minimalSignature() const;
skipping to change at line 546 skipping to change at line 549
void setArrayElementCount(int n) void setArrayElementCount(int n)
{ {
m_arrayElementCount = n; m_arrayElementCount = n;
} }
int arrayElementCount() const int arrayElementCount() const
{ {
return m_arrayElementCount; return m_arrayElementCount;
} }
AbstractMetaType *arrayElementType() const const AbstractMetaType *arrayElementType() const
{ {
return m_arrayElementType; return m_arrayElementType;
} }
void setArrayElementType(AbstractMetaType *t) void setArrayElementType(const AbstractMetaType *t)
{ {
m_arrayElementType = t; m_arrayElementType = t;
} }
QString cppSignature() const; QString cppSignature() const;
AbstractMetaType *copy() const; AbstractMetaType *copy() const;
const TypeEntry *typeEntry() const const TypeEntry *typeEntry() const
{ {
skipping to change at line 588 skipping to change at line 591
{ {
m_originalTemplateType = type; m_originalTemplateType = type;
} }
const AbstractMetaType *originalTemplateType() const const AbstractMetaType *originalTemplateType() const
{ {
return m_originalTemplateType; return m_originalTemplateType;
} }
private: private:
const TypeEntry *m_typeEntry; const TypeEntry *m_typeEntry;
QList <AbstractMetaType *> m_instantiations; AbstractMetaTypeList m_instantiations;
QString m_package; QString m_package;
QString m_originalTypeDescription; QString m_originalTypeDescription;
int m_arrayElementCount; int m_arrayElementCount;
AbstractMetaType *m_arrayElementType; const AbstractMetaType *m_arrayElementType;
const AbstractMetaType *m_originalTemplateType; const AbstractMetaType *m_originalTemplateType;
TypeUsagePattern m_pattern; TypeUsagePattern m_pattern;
uint m_constant : 1; uint m_constant : 1;
uint m_reference : 1; uint m_reference : 1;
uint m_cppInstantiation : 1; uint m_cppInstantiation : 1;
int m_indirections : 4; int m_indirections : 4;
uint m_reserved : 25; // unused uint m_reserved : 25; // unused
AbstractMetaTypeList m_children;
Q_DISABLE_COPY(AbstractMetaType);
}; };
class APIEXTRACTOR_API AbstractMetaVariable class APIEXTRACTOR_API AbstractMetaVariable
{ {
public: public:
AbstractMetaVariable() : m_type(0) {} AbstractMetaVariable() : m_type(0), m_hasName(false) {}
AbstractMetaVariable(const AbstractMetaVariable &other);
virtual ~AbstractMetaVariable()
{
delete m_type;
}
AbstractMetaType *type() const AbstractMetaType *type() const
{ {
return m_type; return m_type;
} }
void setType(AbstractMetaType *type) void setType(AbstractMetaType *type)
{ {
Q_ASSERT(m_type == 0);
m_type = type;
}
void replaceType(AbstractMetaType *type)
{
if (m_type)
delete m_type;
m_type = type; m_type = type;
} }
QString name() const QString name() const
{ {
return m_name; return m_name;
} }
void setName(const QString &name) void setName(const QString &name, bool realName = true)
{ {
m_name = name; m_name = name;
m_hasName = realName;
}
bool hasName() const
{
return m_hasName;
}
QString originalName() const
{
return m_originalName;
}
void setOriginalName(const QString& name)
{
m_originalName = name;
} }
void setDocumentation(const Documentation& doc) void setDocumentation(const Documentation& doc)
{ {
m_doc = doc; m_doc = doc;
} }
Documentation documentation() const Documentation documentation() const
{ {
return m_doc; return m_doc;
} }
private: private:
skipping to change at line 637 skipping to change at line 668
void setDocumentation(const Documentation& doc) void setDocumentation(const Documentation& doc)
{ {
m_doc = doc; m_doc = doc;
} }
Documentation documentation() const Documentation documentation() const
{ {
return m_doc; return m_doc;
} }
private: private:
QString m_originalName;
QString m_name; QString m_name;
AbstractMetaType *m_type; AbstractMetaType *m_type;
bool m_hasName;
Documentation m_doc; Documentation m_doc;
}; };
class APIEXTRACTOR_API AbstractMetaArgument : public AbstractMetaVariable class APIEXTRACTOR_API AbstractMetaArgument : public AbstractMetaVariable
{ {
public: public:
AbstractMetaArgument() : m_argumentIndex(0) {}; AbstractMetaArgument() : m_argumentIndex(0) {};
QString defaultValueExpression() const QString defaultValueExpression() const
skipping to change at line 681 skipping to change at line 714
int argumentIndex() const int argumentIndex() const
{ {
return m_argumentIndex; return m_argumentIndex;
} }
void setArgumentIndex(int argIndex) void setArgumentIndex(int argIndex)
{ {
m_argumentIndex = argIndex; m_argumentIndex = argIndex;
} }
QString argumentName() const;
QString indexedName() const;
AbstractMetaArgument *copy() const; AbstractMetaArgument *copy() const;
private: private:
// Just to force people to call argumentName() And indexedName();
QString name() const;
QString m_expression; QString m_expression;
QString m_originalExpression; QString m_originalExpression;
int m_argumentIndex; int m_argumentIndex;
friend class AbstractMetaClass;
}; };
class APIEXTRACTOR_API AbstractMetaField : public AbstractMetaVariable, pub lic AbstractMetaAttributes class APIEXTRACTOR_API AbstractMetaField : public AbstractMetaVariable, pub lic AbstractMetaAttributes
{ {
public: public:
AbstractMetaField(); AbstractMetaField();
~AbstractMetaField(); ~AbstractMetaField();
const AbstractMetaClass *enclosingClass() const const AbstractMetaClass *enclosingClass() const
{ {
skipping to change at line 880 skipping to change at line 908
} }
bool isModifiedRemoved(int types = TypeSystem::All) const; bool isModifiedRemoved(int types = TypeSystem::All) const;
AbstractMetaType *type() const AbstractMetaType *type() const
{ {
return m_type; return m_type;
} }
void setType(AbstractMetaType *type) void setType(AbstractMetaType *type)
{ {
Q_ASSERT(m_type == 0);
m_type = type;
}
void replaceType(AbstractMetaType *type)
{
if (m_type)
delete m_type;
m_type = type; m_type = type;
} }
// The class that has this function as a member. // The class that has this function as a member.
const AbstractMetaClass *ownerClass() const const AbstractMetaClass *ownerClass() const
{ {
return m_class; return m_class;
} }
void setOwnerClass(const AbstractMetaClass *cls) void setOwnerClass(const AbstractMetaClass *cls)
{ {
skipping to change at line 1066 skipping to change at line 1102
TypeSystem::Language language = TypeSyst em::All) const; TypeSystem::Language language = TypeSyst em::All) const;
/** /**
* Verifies if any modification to the function alters/removes its * Verifies if any modification to the function alters/removes its
* arguments types or default values. * arguments types or default values.
* \return true if there is some modification to function signature * \return true if there is some modification to function signature
*/ */
bool hasSignatureModifications() const; bool hasSignatureModifications() const;
FunctionModificationList modifications(const AbstractMetaClass* impleme ntor = 0) const; FunctionModificationList modifications(const AbstractMetaClass* impleme ntor = 0) const;
/**
* Return the argument name if there is a modification the renamed valu
e will be returned
*/
QString argumentName(int index, bool create = true, const AbstractMetaC
lass *cl = 0) const;
// If this function stems from an interface, this returns the // If this function stems from an interface, this returns the
// interface that declares it. // interface that declares it.
const AbstractMetaClass *interfaceClass() const const AbstractMetaClass *interfaceClass() const
{ {
return m_interfaceClass; return m_interfaceClass;
} }
void setInterfaceClass(const AbstractMetaClass *cl) void setInterfaceClass(const AbstractMetaClass *cl)
{ {
m_interfaceClass = cl; m_interfaceClass = cl;
skipping to change at line 1193 skipping to change at line 1234
class AbstractMetaEnumValueList : public QList<AbstractMetaEnumValue *> class AbstractMetaEnumValueList : public QList<AbstractMetaEnumValue *>
{ {
public: public:
AbstractMetaEnumValue *find(const QString &name) const; AbstractMetaEnumValue *find(const QString &name) const;
}; };
class AbstractMetaEnum : public AbstractMetaAttributes class AbstractMetaEnum : public AbstractMetaAttributes
{ {
public: public:
AbstractMetaEnum() : m_typeEntry(0), m_class(0), m_hasQenumsDeclaration (false) {} AbstractMetaEnum() : m_typeEntry(0), m_class(0), m_hasQenumsDeclaration (false) {}
~AbstractMetaEnum()
{
qDeleteAll(m_enumValues);
}
AbstractMetaEnumValueList values() const AbstractMetaEnumValueList values() const
{ {
return m_enumValues; return m_enumValues;
} }
void addEnumValue(AbstractMetaEnumValue *enumValue) void addEnumValue(AbstractMetaEnumValue *enumValue)
{ {
m_enumValues << enumValue; m_enumValues << enumValue;
} }
skipping to change at line 1337 skipping to change at line 1382
m_hasCloneOperator(false), m_hasCloneOperator(false),
m_isTypeAlias(false), m_isTypeAlias(false),
m_enclosingClass(0), m_enclosingClass(0),
m_baseClass(0), m_baseClass(0),
m_templateBaseClass(0), m_templateBaseClass(0),
m_extractedInterface(0), m_extractedInterface(0),
m_primaryInterfaceImplementor(0), m_primaryInterfaceImplementor(0),
m_typeEntry(0), m_typeEntry(0),
//m_qDebugStreamFunction(0) //m_qDebugStreamFunction(0)
m_stream(false) m_stream(false)
{} {
}
virtual ~AbstractMetaClass(); virtual ~AbstractMetaClass();
AbstractMetaClass *extractInterface(); AbstractMetaClass *extractInterface();
void fixFunctions(); void fixFunctions();
AbstractMetaFunctionList functions() const AbstractMetaFunctionList functions() const
{ {
return m_functions; return m_functions;
} }
skipping to change at line 1846 skipping to change at line 1892
uint m_isTypeAlias : 1; uint m_isTypeAlias : 1;
uint m_reserved : 18; uint m_reserved : 18;
const AbstractMetaClass *m_enclosingClass; const AbstractMetaClass *m_enclosingClass;
AbstractMetaClass *m_baseClass; AbstractMetaClass *m_baseClass;
const AbstractMetaClass *m_templateBaseClass; const AbstractMetaClass *m_templateBaseClass;
AbstractMetaFunctionList m_functions; AbstractMetaFunctionList m_functions;
AbstractMetaFieldList m_fields; AbstractMetaFieldList m_fields;
AbstractMetaEnumList m_enums; AbstractMetaEnumList m_enums;
AbstractMetaClassList m_interfaces; AbstractMetaClassList m_interfaces;
AbstractMetaClassList m_orphanInterfaces;
AbstractMetaClass *m_extractedInterface; AbstractMetaClass *m_extractedInterface;
AbstractMetaClass *m_primaryInterfaceImplementor; AbstractMetaClass *m_primaryInterfaceImplementor;
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; 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;
static int m_count;
}; };
class QPropertySpec class QPropertySpec
{ {
public: public:
QPropertySpec(const TypeEntry *type) QPropertySpec(const TypeEntry *type)
: m_type(type), : m_type(type),
m_index(-1) m_index(-1)
{} {}
 End of changes. 32 change blocks. 
30 lines changed or deleted 81 lines changed or added


 reporthandler.h   reporthandler.h 
skipping to change at line 72 skipping to change at line 72
debug(MediumDebug, str); debug(MediumDebug, str);
} }
static void debugFull(const QString &str) static void debugFull(const QString &str)
{ {
debug(FullDebug, str); debug(FullDebug, str);
} }
static void debug(DebugLevel level, const QString &str); static void debug(DebugLevel level, const QString &str);
static bool isSilent(); static bool isSilent();
static void setSilent(bool silent); static void setSilent(bool silent);
static void flush();
}; };
#endif // REPORTHANDLER_H #endif // REPORTHANDLER_H
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 typesystem.h   typesystem.h 
skipping to change at line 98 skipping to change at line 98
Remove = 0x04, Remove = 0x04,
Set = 0x08, Set = 0x08,
Ignore = 0x10, Ignore = 0x10,
ActionsMask = 0xff, ActionsMask = 0xff,
Padding = 0xffffffff Padding = 0xffffffff
}; };
Action action; Action action;
QString varName;
}; };
struct ArgumentOwner struct ArgumentOwner
{ {
enum Action { enum Action {
Invalid = 0x00, Invalid = 0x00,
Add = 0x01, Add = 0x01,
Remove = 0x02 Remove = 0x02
}; };
ArgumentOwner() : action(ArgumentOwner::Invalid), index(-2) {} ArgumentOwner() : action(ArgumentOwner::Invalid), index(-2) {}
Action action; Action action;
int index; int index;
}; };
class APIEXTRACTOR_API CodeSnipFragment class APIEXTRACTOR_API CodeSnipFragment
{ {
private: private:
const QString m_code; QString m_code;
TemplateInstance *m_instance; TemplateInstance *m_instance;
public: public:
CodeSnipFragment(const QString &code) CodeSnipFragment(const QString &code)
: m_code(code), : m_code(code),
m_instance(0) {} m_instance(0) {}
CodeSnipFragment(TemplateInstance *instance) CodeSnipFragment(TemplateInstance *instance)
: m_instance(instance) {} : m_instance(instance) {}
QString code() const; QString code() const;
}; };
class APIEXTRACTOR_API CodeSnipAbstract class APIEXTRACTOR_API CodeSnipAbstract
{ {
public: public:
QString code() const; QString code() const;
void addCode(const QString &code) void addCode(const QString &code)
{ {
codeList.append(new CodeSnipFragment(code)); codeList.append(CodeSnipFragment(code));
} }
void addTemplateInstance(TemplateInstance *ti) void addTemplateInstance(TemplateInstance *ti)
{ {
codeList.append(new CodeSnipFragment(ti)); codeList.append(CodeSnipFragment(ti));
} }
QList<CodeSnipFragment*> codeList; QList<CodeSnipFragment> codeList;
}; };
class CustomFunction : public CodeSnipAbstract class CustomFunction : public CodeSnipAbstract
{ {
public: public:
CustomFunction(const QString &n = QString()) : name(n) { } CustomFunction(const QString &n = QString()) : name(n) { }
QString name; QString name;
QString paramName; QString paramName;
}; };
skipping to change at line 279 skipping to change at line 280
QHash<TypeSystem::Language, TypeSystem::Ownership> ownerships; QHash<TypeSystem::Language, TypeSystem::Ownership> ownerships;
// Different conversion rules // Different conversion rules
CodeSnipList conversion_rules; CodeSnipList conversion_rules;
//QObject parent(owner) of this argument //QObject parent(owner) of this argument
ArgumentOwner owner; ArgumentOwner owner;
//Api version //Api version
double version; double version;
//New name
QString renamed_to;
}; };
struct APIEXTRACTOR_API Modification struct APIEXTRACTOR_API Modification
{ {
enum Modifiers { enum Modifiers {
Private = 0x0001, Private = 0x0001,
Protected = 0x0002, Protected = 0x0002,
Public = 0x0003, Public = 0x0003,
Friendly = 0x0004, Friendly = 0x0004,
AccessModifierMask = 0x000f, AccessModifierMask = 0x000f,
skipping to change at line 1053 skipping to change at line 1057
QString targetLangApiName() const QString targetLangApiName() const
{ {
return m_targetLangApiName; return m_targetLangApiName;
} }
void setTargetLangApiName(const QString &targetLangApiName) void setTargetLangApiName(const QString &targetLangApiName)
{ {
m_targetLangApiName = targetLangApiName; m_targetLangApiName = targetLangApiName;
} }
QString defaultConstructor() const
{
return m_defaultConstructor;
}
void setDefaultConstructor(const QString& defaultConstructor)
{
m_defaultConstructor = defaultConstructor;
}
bool hasDefaultConstructor() const
{
return !m_defaultConstructor.isEmpty();
}
/** /**
* The PrimitiveTypeEntry pointed by this type entry if it * The PrimitiveTypeEntry pointed by this type entry if it
* represents an alias (i.e. a typedef). * represents an alias (i.e. a typedef).
* /return the type pointed by the alias, or a null pointer * /return the type pointed by the alias, or a null pointer
* if the current object is not an alias * if the current object is not an alias
*/ */
PrimitiveTypeEntry* aliasedTypeEntry() const { return m_aliasedTypeEntr y; } PrimitiveTypeEntry* aliasedTypeEntry() const { return m_aliasedTypeEntr y; }
/** /**
* Defines type aliased by this entry. * Defines type aliased by this entry.
skipping to change at line 1099 skipping to change at line 1116
return m_preferredTargetLangType; return m_preferredTargetLangType;
} }
virtual void setPreferredTargetLangType(bool b) virtual void setPreferredTargetLangType(bool b)
{ {
m_preferredTargetLangType = b; m_preferredTargetLangType = b;
} }
private: private:
QString m_targetLangName; QString m_targetLangName;
QString m_targetLangApiName; QString m_targetLangApiName;
QString m_defaultConstructor;
uint m_preferredConversion : 1; uint m_preferredConversion : 1;
uint m_preferredTargetLangType : 1; uint m_preferredTargetLangType : 1;
PrimitiveTypeEntry* m_aliasedTypeEntry; PrimitiveTypeEntry* m_aliasedTypeEntry;
}; };
typedef QList<const PrimitiveTypeEntry*> PrimitiveTypeEntryList; typedef QList<const PrimitiveTypeEntry*> PrimitiveTypeEntryList;
struct EnumValueRedirection struct EnumValueRedirection
{ {
EnumValueRedirection(const QString &rej, const QString &us) EnumValueRedirection(const QString &rej, const QString &us)
 End of changes. 8 change blocks. 
4 lines changed or deleted 22 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/