comparison generator/abstractmetalang.h @ 335:1e9092e20a67

merge signals branch into default
author eldar1@eldar1-laptop
date Sun, 07 Feb 2010 16:04:36 +0000
parents baaf74652f4c
children 18bd68f586c6
comparison
equal deleted inserted replaced
306:70f64e5b5942 335:1e9092e20a67
404 EqualAttributes = 0x00000004, 404 EqualAttributes = 0x00000004,
405 EqualImplementor = 0x00000008, 405 EqualImplementor = 0x00000008,
406 EqualReturnType = 0x00000010, 406 EqualReturnType = 0x00000010,
407 EqualDefaultValueOverload = 0x00000020, 407 EqualDefaultValueOverload = 0x00000020,
408 EqualModifiedName = 0x00000040, 408 EqualModifiedName = 0x00000040,
409 EqualConstness = 0x00000080,
409 410
410 NameLessThan = 0x00001000, 411 NameLessThan = 0x00001000,
411 412
412 PrettySimilar = EqualName | EqualArguments, 413 PrettySimilar = EqualName | EqualArguments | EqualConstness,
413 Equal = 0x0000001f, 414 Equal = 0x0000001f,
414 NotEqual = 0x00001000 415 NotEqual = 0x00001000
415 }; 416 };
416 417
417 AbstractMetaFunction() 418 AbstractMetaFunction()
438 QString originalName() const { return m_original_name.isEmpty() ? name() : m_original_name; } 439 QString originalName() const { return m_original_name.isEmpty() ? name() : m_original_name; }
439 void setOriginalName(const QString &name) { m_original_name = name; } 440 void setOriginalName(const QString &name) { m_original_name = name; }
440 441
441 QString modifiedName() const; 442 QString modifiedName() const;
442 443
443 QString minimalSignature() const; 444 QString minimalSignature(int reduce = 0) const;
444 QStringList possibleIntrospectionCompatibleSignatures() const; 445 QStringList possibleIntrospectionCompatibleSignatures() const;
445 446
446 QString marshalledName(bool classIsOwner = true) const; 447 QString marshalledName(bool classIsOwner = true) const;
447 448
448 // true if one or more of the arguments are of QtJambiObject subclasses 449 // true if one or more of the arguments are of QtJambiObject subclasses
711 bool hasFunction(const AbstractMetaFunction *f) const; 712 bool hasFunction(const AbstractMetaFunction *f) const;
712 bool hasFunction(const QString &str) const; 713 bool hasFunction(const QString &str) const;
713 bool hasSignal(const AbstractMetaFunction *f) const; 714 bool hasSignal(const AbstractMetaFunction *f) const;
714 715
715 bool hasConstructors() const; 716 bool hasConstructors() const;
717 AbstractMetaFunction *copyConstructor() const;
716 718
717 void addDefaultConstructor(); 719 void addDefaultConstructor();
718 720
719 bool hasNonPrivateConstructor() const { return m_has_nonprivateconstructor; } 721 bool hasNonPrivateConstructor() const { return m_has_nonprivateconstructor; }
720 void setHasNonPrivateConstructor(bool on) { m_has_nonprivateconstructor = on; } 722 void setHasNonPrivateConstructor(bool on) { m_has_nonprivateconstructor = on; }
843 845
844 void setTypeAlias(bool typeAlias) { m_is_type_alias = typeAlias; } 846 void setTypeAlias(bool typeAlias) { m_is_type_alias = typeAlias; }
845 bool isTypeAlias() const { return m_is_type_alias; } 847 bool isTypeAlias() const { return m_is_type_alias; }
846 848
847 const QStringList &depends() { return m_type_entry->depends(); } 849 const QStringList &depends() { return m_type_entry->depends(); }
850 AbstractMetaFunctionList allFunctions() const { return m_functions; }
848 851
849 bool needsConversionFunc; 852 bool needsConversionFunc;
850 private: 853 private:
851 uint m_namespace : 1; 854 uint m_namespace : 1;
852 uint m_qobject : 1; 855 uint m_qobject : 1;
967 return queryFunctions(Signals 970 return queryFunctions(Signals
968 | Visible 971 | Visible
969 | NotRemovedFromTargetLang); 972 | NotRemovedFromTargetLang);
970 } 973 }
971 974
975 inline bool isNativeContainer(AbstractMetaType *argumentType)
976 {
977 if (argumentType && argumentType->isContainer())
978 if (((const ContainerTypeEntry *)argumentType->typeEntry())->isQList())
979 return true;
980 return false;
981 }
982
972 #endif // ABSTRACTMETALANG_H 983 #endif // ABSTRACTMETALANG_H