abstractmetalang.h   abstractmetalang.h 
skipping to change at line 1586 skipping to change at line 1586
return !isFinal() && m_hasVirtuals; return !isFinal() && m_hasVirtuals;
} }
/** /**
* Says if the class that declares or inherits a virtual function. * Says if the class that declares or inherits a virtual function.
* \return true if the class implements or inherits any virtual method s * \return true if the class implements or inherits any virtual method s
*/ */
bool isPolymorphic() const bool isPolymorphic() const
{ {
return m_isPolymorphic; return m_isPolymorphic;
} }
/**
* Tells if this class has one or more functions that are protected.
* \return true if the class has protected functions.
*/
bool hasProtectedFunctions() const; bool hasProtectedFunctions() const;
/**
* Tells if this class has one or more fields (member variables) that a
re protected.
* \return true if the class has protected fields.
*/
bool hasProtectedFields() const;
/**
* Tells if this class has one or more members (functions or fields) th
at are protected.
* \return true if the class has protected members.
*/
bool hasProtectedMembers() const;
QList<TypeEntry *> templateArguments() const QList<TypeEntry *> templateArguments() const
{ {
return m_templateArgs; return m_templateArgs;
} }
void setTemplateArguments(const QList<TypeEntry *> &args) void setTemplateArguments(const QList<TypeEntry *> &args)
{ {
m_templateArgs = args; m_templateArgs = args;
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 19 lines changed or added


 apiextractor.h   apiextractor.h 
skipping to change at line 50 skipping to change at line 50
void setTypeSystem(const QString& typeSystemFileName); void setTypeSystem(const QString& typeSystemFileName);
void setCppFileName(const QString& cppFileName); void setCppFileName(const QString& cppFileName);
void setDebugLevel(ReportHandler::DebugLevel debugLevel); void setDebugLevel(ReportHandler::DebugLevel debugLevel);
void setSuppressWarnings(bool value); void setSuppressWarnings(bool value);
void setSilent(bool value); void setSilent(bool value);
void addTypesystemSearchPath(const QString& path); void addTypesystemSearchPath(const QString& path);
void addTypesystemSearchPath(const QStringList& paths); void addTypesystemSearchPath(const QStringList& paths);
void addIncludePath(const QString& path); void addIncludePath(const QString& path);
void addIncludePath(const QStringList& paths); void addIncludePath(const QStringList& paths);
void setLogDirectory(const QString& logDir); void setLogDirectory(const QString& logDir);
void setApiVersion(double version);
AbstractMetaEnumList globalEnums() const; AbstractMetaEnumList globalEnums() const;
AbstractMetaFunctionList globalFunctions() const; AbstractMetaFunctionList globalFunctions() const;
AbstractMetaClassList classes() const; AbstractMetaClassList classes() const;
PrimitiveTypeEntryList primitiveTypes() const; PrimitiveTypeEntryList primitiveTypes() const;
ContainerTypeEntryList containerTypes() const; ContainerTypeEntryList containerTypes() const;
QSet<QString> qtMetaTypeDeclaredTypeNames() const; QSet<QString> qtMetaTypeDeclaredTypeNames() const;
const AbstractMetaEnum* findAbstractMetaEnum(const EnumTypeEntry* typeE
ntry) const;
const AbstractMetaEnum* findAbstractMetaEnum(const TypeEntry* typeEntry
) const;
const AbstractMetaEnum* findAbstractMetaEnum(const FlagsTypeEntry* type
Entry) const;
const AbstractMetaEnum* findAbstractMetaEnum(const AbstractMetaType* me
taType) const;
int classCount() const; int classCount() const;
bool run(); bool run();
private: private:
QString m_typeSystemFileName; QString m_typeSystemFileName;
QString m_cppFileName; QString m_cppFileName;
QStringList m_includePaths; QStringList m_includePaths;
AbstractMetaBuilder* m_builder; AbstractMetaBuilder* m_builder;
QString m_logDirectory; QString m_logDirectory;
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added


 include.h   include.h 
skipping to change at line 72 skipping to change at line 72
bool operator<(const Include& other) const bool operator<(const Include& other) const
{ {
return m_name < other.m_name; return m_name < other.m_name;
} }
bool operator==(const Include& other) const bool operator==(const Include& other) const
{ {
return m_type == other.m_type && m_name == other.m_name; return m_type == other.m_type && m_name == other.m_name;
} }
friend uint qHash(const Include&); friend APIEXTRACTOR_API uint qHash(const Include&);
private: private:
IncludeType m_type; IncludeType m_type;
QString m_name; QString m_name;
}; };
APIEXTRACTOR_API uint qHash(const Include& inc); APIEXTRACTOR_API uint qHash(const Include& inc);
APIEXTRACTOR_API QTextStream& operator<<(QTextStream& out, const Include& i nclude); APIEXTRACTOR_API QTextStream& operator<<(QTextStream& out, const Include& i nclude);
typedef QList<Include> IncludeList; typedef QList<Include> IncludeList;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 typedatabase.h   typedatabase.h 
skipping to change at line 41 skipping to change at line 41
class PrimitiveTypeEntry; class PrimitiveTypeEntry;
class APIEXTRACTOR_API TypeDatabase class APIEXTRACTOR_API TypeDatabase
{ {
TypeDatabase(); TypeDatabase();
TypeDatabase(const TypeDatabase&); TypeDatabase(const TypeDatabase&);
TypeDatabase& operator=(const TypeDatabase&); TypeDatabase& operator=(const TypeDatabase&);
public: public:
/** /**
* Return the type system instance. * Return the type system instance.
* \param newInstance This parameter is usefull just for unit testing, b ecause singletons causes * \param newInstance This parameter is useful just for unit testing, be cause singletons causes
* too many side effects on unit testing. * too many side effects on unit testing.
*/ */
static TypeDatabase* instance(bool newInstance = false); static TypeDatabase* instance(bool newInstance = false);
static QString normalizedSignature(const char* signature); static QString normalizedSignature(const char* signature);
QStringList requiredTargetImports() const; QStringList requiredTargetImports() const;
void addRequiredTargetImport(const QString& moduleName); void addRequiredTargetImport(const QString& moduleName);
skipping to change at line 171 skipping to change at line 171
static QString globalNamespaceClassName(const TypeEntry *te); static QString globalNamespaceClassName(const TypeEntry *te);
QString filename() const QString filename() const
{ {
return "typesystem.txt"; return "typesystem.txt";
} }
QString modifiedTypesystemFilepath(const QString& tsFile) const; QString modifiedTypesystemFilepath(const QString& tsFile) const;
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);
double apiVersion() const
{
return m_apiVersion;
}
void setApiVersion(double version)
{
m_apiVersion = version;
}
bool supportedApiVersion(double version) const;
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_globalUserFunctions; 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;
double m_apiVersion;
}; };
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 15 lines changed or added


 typesystem.h   typesystem.h 
skipping to change at line 160 skipping to change at line 160
public: public:
CustomFunction(const QString &n = QString()) : name(n) { } CustomFunction(const QString &n = QString()) : name(n) { }
QString name; QString name;
QString paramName; QString paramName;
}; };
class TemplateEntry : public CodeSnipAbstract class TemplateEntry : public CodeSnipAbstract
{ {
public: public:
TemplateEntry(const QString &name) TemplateEntry(const QString &name, double vr)
: m_name(name) : m_name(name), m_version(vr)
{ {
}; };
QString name() const QString name() const
{ {
return m_name; return m_name;
}; };
double version() const
{
return m_version;
}
private: private:
QString m_name; QString m_name;
double m_version;
}; };
typedef QHash<QString, TemplateEntry *> TemplateEntryHash; typedef QHash<QString, TemplateEntry *> TemplateEntryHash;
class TemplateInstance class TemplateInstance
{ {
public: public:
TemplateInstance(const QString &name) TemplateInstance(const QString &name, double vr)
: m_name(name) {} : m_name(name), m_version(vr) {}
void addReplaceRule(const QString &name, const QString &value) void addReplaceRule(const QString &name, const QString &value)
{ {
replaceRules[name] = value; replaceRules[name] = value;
} }
QString expandCode() const; QString expandCode() const;
QString name() const QString name() const
{ {
return m_name; return m_name;
} }
double version() const
{
return m_version;
}
private: private:
const QString m_name; const QString m_name;
double m_version;
QHash<QString, QString> replaceRules; QHash<QString, QString> replaceRules;
}; };
class APIEXTRACTOR_API CodeSnip : public CodeSnipAbstract class APIEXTRACTOR_API CodeSnip : public CodeSnipAbstract
{ {
public: public:
enum Position { enum Position {
Beginning, Beginning,
End, End,
AfterThis, AfterThis,
// QtScript // QtScript
Declaration, Declaration,
PrototypeInitialization, PrototypeInitialization,
ConstructorInitialization, ConstructorInitialization,
Constructor, Constructor,
Any Any
}; };
CodeSnip() : language(TypeSystem::TargetLangCode) { } CodeSnip(double vr) : language(TypeSystem::TargetLangCode), version(vr)
CodeSnip(TypeSystem::Language lang) : language(lang) { } { }
CodeSnip(double vr, TypeSystem::Language lang) : language(lang), versio
n(vr) { }
TypeSystem::Language language; TypeSystem::Language language;
Position position; Position position;
ArgumentMap argumentMap; ArgumentMap argumentMap;
double version;
}; };
typedef QList<CodeSnip> CodeSnipList; typedef QList<CodeSnip> CodeSnipList;
struct ArgumentModification struct ArgumentModification
{ {
ArgumentModification(int idx) ArgumentModification(int idx, double vr)
: removedDefaultExpression(false), removed(false), : removedDefaultExpression(false), removed(false),
noNullPointers(false), index(idx) {} noNullPointers(false), index(idx), version(vr) {}
// Should the default expression be removed? // Should the default expression be removed?
uint removedDefaultExpression : 1; uint removedDefaultExpression : 1;
uint removed : 1; uint removed : 1;
uint noNullPointers : 1; uint noNullPointers : 1;
uint resetAfterUse : 1; uint resetAfterUse : 1;
// The index of this argument // The index of this argument
int index; int index;
skipping to change at line 263 skipping to change at line 276
QString replacedDefaultExpression; QString replacedDefaultExpression;
// The new definition of ownership for a specific argument // The new definition of ownership for a specific argument
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
double version;
}; };
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 352 skipping to change at line 368
{ {
return modifiers & Rename; return modifiers & Rename;
} }
uint modifiers; uint modifiers;
QString renamedToName; QString renamedToName;
}; };
struct APIEXTRACTOR_API FunctionModification: public Modification struct APIEXTRACTOR_API FunctionModification: public Modification
{ {
FunctionModification() : removal(TypeSystem::NoLanguage), m_thread(fals e), m_allowThread(false) {} FunctionModification(double vr) : removal(TypeSystem::NoLanguage), m_th read(false), m_allowThread(false), m_version(vr) {}
bool isCodeInjection() const bool isCodeInjection() const
{ {
return modifiers & CodeInjection; return modifiers & CodeInjection;
} }
bool isRemoveModifier() const bool isRemoveModifier() const
{ {
return removal != TypeSystem::NoLanguage; return removal != TypeSystem::NoLanguage;
} }
void setIsThread(bool flag) void setIsThread(bool flag)
skipping to change at line 378 skipping to change at line 394
return m_thread; return m_thread;
} }
bool allowThread() const bool allowThread() const
{ {
return m_allowThread; return m_allowThread;
} }
void setAllowThread(bool allow) void setAllowThread(bool allow)
{ {
m_allowThread = allow; m_allowThread = allow;
} }
double version() const
{
return m_version;
}
QString toString() const; QString toString() const;
QString signature; QString signature;
QString association; QString association;
CodeSnipList snips; CodeSnipList snips;
TypeSystem::Language removal; TypeSystem::Language removal;
QList<ArgumentModification> argument_mods; QList<ArgumentModification> argument_mods;
private: private:
FunctionModification() {}
bool m_thread; bool m_thread;
bool m_allowThread; bool m_allowThread;
double m_version;
}; };
typedef QList<FunctionModification> FunctionModificationList; typedef QList<FunctionModification> FunctionModificationList;
struct FieldModification: public Modification struct FieldModification: public Modification
{ {
bool isReadable() const bool isReadable() const
{ {
return modifiers & Readable; return modifiers & Readable;
} }
skipping to change at line 441 skipping to change at line 464
struct TypeInfo { struct TypeInfo {
TypeInfo() : isConstant(false), indirections(0), isReference(false) {} TypeInfo() : isConstant(false), indirections(0), isReference(false) {}
QString name; QString name;
bool isConstant; bool isConstant;
int indirections; int indirections;
bool isReference; bool isReference;
QString defaultValue; QString defaultValue;
}; };
/// Creates a new AddedFunction with a signature and a return type. /// Creates a new AddedFunction with a signature and a return type.
AddedFunction(QString signature, QString returnType); AddedFunction(QString signature, QString returnType, double vr);
/// Returns the function name. /// Returns the function name.
QString name() const QString name() const
{ {
return m_name; return m_name;
} }
/// Set the function access type. /// Set the function access type.
void setAccess(Access access) void setAccess(Access access)
{ {
skipping to change at line 490 skipping to change at line 513
void setStatic(bool value) void setStatic(bool value)
{ {
m_isStatic = value; m_isStatic = value;
} }
/// Returns true if this is a static method. /// Returns true if this is a static method.
bool isStatic() const bool isStatic() const
{ {
return m_isStatic; return m_isStatic;
} }
double version() const
{
return m_version;
}
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; bool m_isStatic;
double m_version;
}; };
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 524 skipping to change at line 553
class DocModification class DocModification
{ {
public: public:
enum Mode { enum Mode {
Append, Append,
Prepend, Prepend,
Replace, Replace,
XPathReplace XPathReplace
}; };
DocModification(const QString& xpath, const QString& signature) DocModification(const QString& xpath, const QString& signature, double vr)
: format(TypeSystem::NativeCode), m_mode(XPathReplace), : format(TypeSystem::NativeCode), m_mode(XPathReplace),
m_xpath(xpath), m_signature(signature) {} m_xpath(xpath), m_signature(signature), m_version(vr) {}
DocModification(Mode mode, const QString& signature) DocModification(Mode mode, const QString& signature, double vr)
: m_mode(mode), m_signature(signature) {} : m_mode(mode), m_signature(signature), m_version(vr) {}
void setCode(const QString& code) void setCode(const QString& code)
{ {
m_code = code; m_code = code;
} }
QString code() const QString code() const
{ {
return m_code; return m_code;
} }
QString xpath() const QString xpath() const
skipping to change at line 550 skipping to change at line 579
return m_xpath; return m_xpath;
} }
QString signature() const QString signature() const
{ {
return m_signature; return m_signature;
} }
Mode mode() const Mode mode() const
{ {
return m_mode; return m_mode;
} }
double version() const
{
return m_version;
}
TypeSystem::Language format; TypeSystem::Language format;
private: private:
Mode m_mode; Mode m_mode;
QString m_code; QString m_code;
QString m_xpath; QString m_xpath;
QString m_signature; QString m_signature;
double m_version;
}; };
typedef QList<DocModification> DocModificationList; typedef QList<DocModification> DocModificationList;
class APIEXTRACTOR_API TypeEntry class APIEXTRACTOR_API TypeEntry
{ {
public: public:
enum Type { enum Type {
PrimitiveType, PrimitiveType,
VoidType, VoidType,
skipping to change at line 600 skipping to change at line 634
enum CodeGeneration { enum CodeGeneration {
GenerateTargetLang = 0x0001, GenerateTargetLang = 0x0001,
GenerateCpp = 0x0002, GenerateCpp = 0x0002,
GenerateForSubclass = 0x0004, GenerateForSubclass = 0x0004,
GenerateNothing = 0, GenerateNothing = 0,
GenerateAll = 0xffff, GenerateAll = 0xffff,
GenerateCode = GenerateTargetLang | GenerateCpp GenerateCode = GenerateTargetLang | GenerateCpp
}; };
TypeEntry(const QString &name, Type t) TypeEntry(const QString &name, Type t, double vr)
: m_name(name), : m_name(name),
m_type(t), m_type(t),
m_codeGeneration(GenerateAll), m_codeGeneration(GenerateAll),
m_preferredConversion(true), m_preferredConversion(true),
m_stream(false) m_stream(false),
m_version(vr)
{ {
}; };
virtual ~TypeEntry() { } virtual ~TypeEntry() { }
Type type() const Type type() const
{ {
return m_type; return m_type;
} }
bool isPrimitive() const bool isPrimitive() const
skipping to change at line 827 skipping to change at line 862
virtual bool isComplex() const virtual bool isComplex() const
{ {
return false; return false;
} }
virtual bool isNativeIdBased() const virtual bool isNativeIdBased() const
{ {
return false; return false;
} }
CodeSnipList codeSnips() const CodeSnipList codeSnips() const;
{
return m_codeSnips;
}
void setCodeSnips(const CodeSnipList &codeSnips) void setCodeSnips(const CodeSnipList &codeSnips)
{ {
m_codeSnips = codeSnips; m_codeSnips = codeSnips;
} }
void addCodeSnip(const CodeSnip &codeSnip) void addCodeSnip(const CodeSnip &codeSnip)
{ {
m_codeSnips << codeSnip; m_codeSnips << codeSnip;
} }
void setDocModification(const DocModificationList& docMods) void setDocModification(const DocModificationList& docMods)
skipping to change at line 892 skipping to change at line 924
{ {
return m_conversionRule; return m_conversionRule;
} }
/// Returns true if there are any conversiton rule for this type, false otherwise. /// Returns true if there are any conversiton rule for this type, false otherwise.
bool hasConversionRule() const bool hasConversionRule() const
{ {
return !m_conversionRule.isEmpty(); return !m_conversionRule.isEmpty();
} }
double version() const
{
return m_version;
}
private: private:
QString m_name; QString m_name;
Type m_type; Type m_type;
uint m_codeGeneration; uint m_codeGeneration;
CustomFunction m_customConstructor; CustomFunction m_customConstructor;
CustomFunction m_customDestructor; CustomFunction m_customDestructor;
bool m_preferredConversion; bool m_preferredConversion;
CodeSnipList m_codeSnips; CodeSnipList m_codeSnips;
DocModificationList m_docModifications; DocModificationList m_docModifications;
IncludeList m_extraIncludes; IncludeList m_extraIncludes;
Include m_include; Include m_include;
QHash<QString, bool> m_includesUsed; QHash<QString, bool> m_includesUsed;
QString m_conversionRule; QString m_conversionRule;
bool m_stream; bool m_stream;
double m_version;
}; };
typedef QHash<QString, QList<TypeEntry *> > TypeEntryHash; typedef QHash<QString, QList<TypeEntry *> > TypeEntryHash;
typedef QHash<QString, TypeEntry *> SingleTypeEntryHash; typedef QHash<QString, TypeEntry *> SingleTypeEntryHash;
class APIEXTRACTOR_API TypeSystemTypeEntry : public TypeEntry class APIEXTRACTOR_API TypeSystemTypeEntry : public TypeEntry
{ {
public: public:
TypeSystemTypeEntry(const QString &name) TypeSystemTypeEntry(const QString &name, double vr)
: TypeEntry(name, TypeSystemType) : TypeEntry(name, TypeSystemType, vr)
{ {
}; };
}; };
class APIEXTRACTOR_API VoidTypeEntry : public TypeEntry class APIEXTRACTOR_API VoidTypeEntry : public TypeEntry
{ {
public: public:
VoidTypeEntry() : TypeEntry("void", VoidType) { } VoidTypeEntry() : TypeEntry("void", VoidType, 0) { }
}; };
class APIEXTRACTOR_API VarargsTypeEntry : public TypeEntry class APIEXTRACTOR_API VarargsTypeEntry : public TypeEntry
{ {
public: public:
VarargsTypeEntry() : TypeEntry("...", VarargsType) { } VarargsTypeEntry() : TypeEntry("...", VarargsType, 0) { }
}; };
class APIEXTRACTOR_API TemplateArgumentEntry : public TypeEntry class APIEXTRACTOR_API TemplateArgumentEntry : public TypeEntry
{ {
public: public:
TemplateArgumentEntry(const QString &name) TemplateArgumentEntry(const QString &name, double vr)
: TypeEntry(name, TemplateArgumentType), m_ordinal(0) : TypeEntry(name, TemplateArgumentType, vr), m_ordinal(0)
{ {
} }
int ordinal() const int ordinal() const
{ {
return m_ordinal; return m_ordinal;
} }
void setOrdinal(int o) void setOrdinal(int o)
{ {
m_ordinal = o; m_ordinal = o;
} }
private: private:
int m_ordinal; int m_ordinal;
}; };
class APIEXTRACTOR_API ArrayTypeEntry : public TypeEntry class APIEXTRACTOR_API ArrayTypeEntry : public TypeEntry
{ {
public: public:
ArrayTypeEntry(const TypeEntry *nested_type) ArrayTypeEntry(const TypeEntry *nested_type, double vr)
: TypeEntry("Array", ArrayType), m_nestedType(nested_type) : TypeEntry("Array", ArrayType, vr), m_nestedType(nested_type)
{ {
Q_ASSERT(m_nestedType); Q_ASSERT(m_nestedType);
} }
void setNestedTypeEntry(TypeEntry *nested) void setNestedTypeEntry(TypeEntry *nested)
{ {
m_nestedType = nested; m_nestedType = nested;
} }
const TypeEntry *nestedTypeEntry() const const TypeEntry *nestedTypeEntry() const
{ {
skipping to change at line 989 skipping to change at line 1027
return "jobjectArray"; return "jobjectArray";
} }
private: private:
const TypeEntry *m_nestedType; const TypeEntry *m_nestedType;
}; };
class APIEXTRACTOR_API PrimitiveTypeEntry : public TypeEntry class APIEXTRACTOR_API PrimitiveTypeEntry : public TypeEntry
{ {
public: public:
PrimitiveTypeEntry(const QString &name) PrimitiveTypeEntry(const QString &name, double vr)
: TypeEntry(name, PrimitiveType), : TypeEntry(name, PrimitiveType, vr),
m_preferredConversion(true), m_preferredConversion(true),
m_preferredTargetLangType(true), m_preferredTargetLangType(true),
m_aliasedTypeEntry(0) m_aliasedTypeEntry(0)
{ {
} }
QString targetLangName() const QString targetLangName() const
{ {
return m_targetLangName; return m_targetLangName;
} }
skipping to change at line 1082 skipping to change at line 1120
used(us) used(us)
{ {
} }
QString rejected; QString rejected;
QString used; QString used;
}; };
class APIEXTRACTOR_API EnumTypeEntry : public TypeEntry class APIEXTRACTOR_API EnumTypeEntry : public TypeEntry
{ {
public: public:
EnumTypeEntry(const QString &nspace, const QString &enumName) EnumTypeEntry(const QString &nspace, const QString &enumName, double vr )
: TypeEntry(nspace.isEmpty() ? enumName : nspace + QLatin1Strin g("::") + enumName, : TypeEntry(nspace.isEmpty() ? enumName : nspace + QLatin1Strin g("::") + enumName,
EnumType), EnumType, vr),
m_flags(0), m_flags(0),
m_extensible(false) m_extensible(false)
{ {
m_qualifier = nspace; m_qualifier = nspace;
m_targetLangName = enumName; m_targetLangName = enumName;
} }
QString targetLangPackage() const QString targetLangPackage() const
{ {
return m_packageName; return m_packageName;
skipping to change at line 1223 skipping to change at line 1261
FlagsTypeEntry *m_flags; FlagsTypeEntry *m_flags;
bool m_extensible; bool m_extensible;
bool m_forceInteger; bool m_forceInteger;
}; };
class APIEXTRACTOR_API EnumValueTypeEntry : public TypeEntry class APIEXTRACTOR_API EnumValueTypeEntry : public TypeEntry
{ {
public: public:
EnumValueTypeEntry(const QString& name, const QString& value, const Enu EnumValueTypeEntry(const QString& name, const QString& value, const Enu
mTypeEntry* enclosingEnum) mTypeEntry* enclosingEnum, double vr)
: TypeEntry(name, TypeEntry::EnumValue), m_value(value), m_enclosin : TypeEntry(name, TypeEntry::EnumValue, vr), m_value(value), m_encl
gEnum(enclosingEnum) osingEnum(enclosingEnum)
{ {
} }
QString value() const { return m_value; } QString value() const { return m_value; }
const EnumTypeEntry* enclosingEnum() const { return m_enclosingEnum; } const EnumTypeEntry* enclosingEnum() const { return m_enclosingEnum; }
private: private:
QString m_value; QString m_value;
const EnumTypeEntry* m_enclosingEnum; const EnumTypeEntry* m_enclosingEnum;
}; };
class APIEXTRACTOR_API FlagsTypeEntry : public TypeEntry class APIEXTRACTOR_API FlagsTypeEntry : public TypeEntry
{ {
public: public:
FlagsTypeEntry(const QString &name) : TypeEntry(name, FlagsType), m_enu m(0) FlagsTypeEntry(const QString &name, double vr) : TypeEntry(name, FlagsT ype, vr), m_enum(0)
{ {
} }
QString qualifiedTargetLangName() const; QString qualifiedTargetLangName() const;
QString targetLangName() const QString targetLangName() const
{ {
return m_targetLangName; return m_targetLangName;
} }
QString targetLangApiName() const; QString targetLangApiName() const;
virtual bool preferredConversion() const virtual bool preferredConversion() const
skipping to change at line 1312 skipping to change at line 1350
Deprecated = 0x4 Deprecated = 0x4
}; };
typedef QFlags<TypeFlag> TypeFlags; typedef QFlags<TypeFlag> TypeFlags;
enum CopyableFlag { enum CopyableFlag {
CopyableSet, CopyableSet,
NonCopyableSet, NonCopyableSet,
Unknown Unknown
}; };
ComplexTypeEntry(const QString &name, Type t) ComplexTypeEntry(const QString &name, Type t, double vr)
: TypeEntry(QString(name).replace(".*::", ""), t), : TypeEntry(QString(name).replace(".*::", ""), t, vr),
m_qualifiedCppName(name), m_qualifiedCppName(name),
m_qobject(false), m_qobject(false),
m_polymorphicBase(false), m_polymorphicBase(false),
m_genericClass(false), m_genericClass(false),
m_typeFlags(0), m_typeFlags(0),
m_copyableFlag(Unknown), m_copyableFlag(Unknown),
m_hashFunction("") m_hashFunction("")
{ {
} }
bool isComplex() const bool isComplex() const
{ {
return true; return true;
} }
ComplexTypeEntry *copy() const ComplexTypeEntry *copy() const
{ {
ComplexTypeEntry *centry = new ComplexTypeEntry(name(), type()); ComplexTypeEntry *centry = new ComplexTypeEntry(name(), type(), ver sion());
centry->setInclude(include()); centry->setInclude(include());
centry->setExtraIncludes(extraIncludes()); centry->setExtraIncludes(extraIncludes());
centry->setAddedFunctions(addedFunctions()); centry->setAddedFunctions(addedFunctions());
centry->setFunctionModifications(functionModifications()); centry->setFunctionModifications(functionModifications());
centry->setFieldModifications(fieldModifications()); centry->setFieldModifications(fieldModifications());
centry->setQObject(isQObject()); centry->setQObject(isQObject());
centry->setDefaultSuperclass(defaultSuperclass()); centry->setDefaultSuperclass(defaultSuperclass());
centry->setCodeSnips(codeSnips()); centry->setCodeSnips(codeSnips());
centry->setTargetLangPackage(targetLangPackage()); centry->setTargetLangPackage(targetLangPackage());
skipping to change at line 1561 skipping to change at line 1599
StackContainer, StackContainer,
QueueContainer, QueueContainer,
SetContainer, SetContainer,
MapContainer, MapContainer,
MultiMapContainer, MultiMapContainer,
HashContainer, HashContainer,
MultiHashContainer, MultiHashContainer,
PairContainer, PairContainer,
}; };
ContainerTypeEntry(const QString &name, Type type) ContainerTypeEntry(const QString &name, Type type, double vr)
: ComplexTypeEntry(name, ContainerType), m_type(type) : ComplexTypeEntry(name, ContainerType, vr), m_type(type)
{ {
setCodeGeneration(GenerateForSubclass); setCodeGeneration(GenerateForSubclass);
} }
Type type() const Type type() const
{ {
return m_type; return m_type;
} }
QString typeName() const; QString typeName() const;
skipping to change at line 1606 skipping to change at line 1644
private: private:
Type m_type; Type m_type;
}; };
typedef QList<const ContainerTypeEntry*> ContainerTypeEntryList; typedef QList<const ContainerTypeEntry*> ContainerTypeEntryList;
class APIEXTRACTOR_API NamespaceTypeEntry : public ComplexTypeEntry class APIEXTRACTOR_API NamespaceTypeEntry : public ComplexTypeEntry
{ {
public: public:
NamespaceTypeEntry(const QString &name) : ComplexTypeEntry(name, Namesp aceType) { } NamespaceTypeEntry(const QString &name, double vr) : ComplexTypeEntry(n ame, NamespaceType, vr) { }
}; };
class ValueTypeEntry : public ComplexTypeEntry class ValueTypeEntry : public ComplexTypeEntry
{ {
public: public:
ValueTypeEntry(const QString &name) : ComplexTypeEntry(name, BasicValue Type) { } ValueTypeEntry(const QString &name, double vr) : ComplexTypeEntry(name, BasicValueType, vr) { }
bool isValue() const bool isValue() const
{ {
return true; return true;
} }
virtual bool isNativeIdBased() const virtual bool isNativeIdBased() const
{ {
return true; return true;
} }
protected: protected:
ValueTypeEntry(const QString &name, Type t) : ComplexTypeEntry(name, t) { } ValueTypeEntry(const QString &name, Type t, double vr) : ComplexTypeEnt ry(name, t, vr) { }
}; };
class StringTypeEntry : public ValueTypeEntry class StringTypeEntry : public ValueTypeEntry
{ {
public: public:
StringTypeEntry(const QString &name) StringTypeEntry(const QString &name, double vr)
: ValueTypeEntry(name, StringType) : ValueTypeEntry(name, StringType, vr)
{ {
setCodeGeneration(GenerateNothing); setCodeGeneration(GenerateNothing);
} }
QString targetLangApiName() const; QString targetLangApiName() const;
QString targetLangName() const; QString targetLangName() const;
QString targetLangPackage() const; QString targetLangPackage() const;
virtual bool isNativeIdBased() const virtual bool isNativeIdBased() const
{ {
return false; return false;
} }
}; };
class CharTypeEntry : public ValueTypeEntry class CharTypeEntry : public ValueTypeEntry
{ {
public: public:
CharTypeEntry(const QString &name) : ValueTypeEntry(name, CharType) CharTypeEntry(const QString &name, double vr) : ValueTypeEntry(name, Ch arType, vr)
{ {
setCodeGeneration(GenerateNothing); setCodeGeneration(GenerateNothing);
} }
QString targetLangApiName() const; QString targetLangApiName() const;
QString targetLangName() const; QString targetLangName() const;
QString targetLangPackage() const QString targetLangPackage() const
{ {
return QString(); return QString();
} }
virtual bool isNativeIdBased() const virtual bool isNativeIdBased() const
{ {
return false; return false;
} }
}; };
class VariantTypeEntry: public ValueTypeEntry class VariantTypeEntry: public ValueTypeEntry
{ {
public: public:
VariantTypeEntry(const QString &name) : ValueTypeEntry(name, VariantTyp e) { } VariantTypeEntry(const QString &name, double vr) : ValueTypeEntry(name, VariantType, vr) { }
QString targetLangApiName() const; QString targetLangApiName() const;
QString targetLangName() const; QString targetLangName() const;
QString targetLangPackage() const; QString targetLangPackage() const;
virtual bool isNativeIdBased() const virtual bool isNativeIdBased() const
{ {
return false; return false;
} }
}; };
class APIEXTRACTOR_API InterfaceTypeEntry : public ComplexTypeEntry class APIEXTRACTOR_API InterfaceTypeEntry : public ComplexTypeEntry
{ {
public: public:
InterfaceTypeEntry(const QString &name) InterfaceTypeEntry(const QString &name, double vr)
: ComplexTypeEntry(name, InterfaceType) {} : ComplexTypeEntry(name, InterfaceType, vr) {}
static QString interfaceName(const QString &name) static QString interfaceName(const QString &name)
{ {
return name + "Interface"; return name + "Interface";
} }
ObjectTypeEntry *origin() const ObjectTypeEntry *origin() const
{ {
return m_origin; return m_origin;
} }
skipping to change at line 1719 skipping to change at line 1757
return ComplexTypeEntry::qualifiedCppName().left(ComplexTypeEntry:: qualifiedCppName().length() - interfaceName("").length()); return ComplexTypeEntry::qualifiedCppName().left(ComplexTypeEntry:: qualifiedCppName().length() - interfaceName("").length());
} }
private: private:
ObjectTypeEntry *m_origin; ObjectTypeEntry *m_origin;
}; };
class APIEXTRACTOR_API FunctionTypeEntry : public TypeEntry class APIEXTRACTOR_API FunctionTypeEntry : public TypeEntry
{ {
public: public:
FunctionTypeEntry(const QString& name, const QString& signature) FunctionTypeEntry(const QString& name, const QString& signature, double
: TypeEntry(name, FunctionType) vr)
: TypeEntry(name, FunctionType, vr)
{ {
addSignature(signature); addSignature(signature);
} }
void addSignature(const QString& signature) void addSignature(const QString& signature)
{ {
m_signatures << signature; m_signatures << signature;
} }
QStringList signatures() const QStringList signatures() const
{ {
skipping to change at line 1745 skipping to change at line 1783
{ {
return m_signatures.contains(signature); return m_signatures.contains(signature);
} }
private: private:
QStringList m_signatures; QStringList m_signatures;
}; };
class APIEXTRACTOR_API ObjectTypeEntry : public ComplexTypeEntry class APIEXTRACTOR_API ObjectTypeEntry : public ComplexTypeEntry
{ {
public: public:
ObjectTypeEntry(const QString &name) ObjectTypeEntry(const QString &name, double vr)
: ComplexTypeEntry(name, ObjectType), m_interface(0) {} : ComplexTypeEntry(name, ObjectType, vr), m_interface(0) {}
InterfaceTypeEntry *designatedInterface() const InterfaceTypeEntry *designatedInterface() const
{ {
return m_interface; return m_interface;
} }
void setDesignatedInterface(InterfaceTypeEntry *entry) void setDesignatedInterface(InterfaceTypeEntry *entry)
{ {
m_interface = entry; m_interface = entry;
} }
 End of changes. 49 change blocks. 
55 lines changed or deleted 96 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/