Changeset View
Changeset View
Standalone View
Standalone View
duchain/types/integraltypeextended.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 39 | public: | |||
---|---|---|---|---|---|
45 | 45 | | |||
46 | /// Default constructor | 46 | /// Default constructor | ||
47 | IntegralTypeExtended(uint type = TypeNone); | 47 | IntegralTypeExtended(uint type = TypeNone); | ||
48 | /// Copy constructor. \param rhs type to copy | 48 | /// Copy constructor. \param rhs type to copy | ||
49 | IntegralTypeExtended(const IntegralTypeExtended& rhs); | 49 | IntegralTypeExtended(const IntegralTypeExtended& rhs); | ||
50 | /// Constructor using raw data. \param data internal data. | 50 | /// Constructor using raw data. \param data internal data. | ||
51 | IntegralTypeExtended(IntegralTypeExtendedData& data); | 51 | IntegralTypeExtended(IntegralTypeExtendedData& data); | ||
52 | 52 | | |||
53 | virtual QString toString() const; | 53 | QString toString() const override; | ||
54 | 54 | | |||
55 | virtual KDevelop::AbstractType* clone() const; | 55 | KDevelop::AbstractType* clone() const override; | ||
56 | 56 | | |||
57 | virtual bool equals(const KDevelop::AbstractType* rhs) const; | 57 | bool equals(const KDevelop::AbstractType* rhs) const override; | ||
58 | 58 | | |||
59 | virtual uint hash() const; | 59 | uint hash() const override; | ||
60 | 60 | | |||
61 | enum { | 61 | enum { | ||
62 | ///TODO: is that value OK? | 62 | ///TODO: is that value OK? | ||
63 | Identity = 50 | 63 | Identity = 50 | ||
64 | }; | 64 | }; | ||
65 | 65 | | |||
66 | typedef KDevelop::IntegralTypeData Data; | 66 | typedef KDevelop::IntegralTypeData Data; | ||
67 | typedef KDevelop::IntegralType BaseType; | 67 | typedef KDevelop::IntegralType BaseType; | ||
68 | 68 | | |||
69 | protected: | 69 | protected: | ||
70 | TYPE_DECLARE_DATA(IntegralTypeExtended); | 70 | TYPE_DECLARE_DATA(IntegralTypeExtended); | ||
71 | }; | 71 | }; | ||
72 | 72 | | |||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | namespace KDevelop | 75 | namespace KDevelop | ||
76 | { | 76 | { | ||
77 | 77 | | |||
78 | template<> | 78 | template<> | ||
79 | inline Php::IntegralTypeExtended* fastCast<Php::IntegralTypeExtended*>(AbstractType* from) { | 79 | inline Php::IntegralTypeExtended* fastCast<Php::IntegralTypeExtended*>(AbstractType* from) { | ||
80 | if ( !from || from->whichType() != AbstractType::TypeIntegral ) { | 80 | if ( !from || from->whichType() != AbstractType::TypeIntegral ) { | ||
81 | return 0; | 81 | return nullptr; | ||
82 | } else { | 82 | } else { | ||
83 | return dynamic_cast<Php::IntegralTypeExtended*>(from); | 83 | return dynamic_cast<Php::IntegralTypeExtended*>(from); | ||
84 | } | 84 | } | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | } | 87 | } | ||
88 | 88 | | |||
89 | #endif // PHPINTEGRALTYPE_H | 89 | #endif // PHPINTEGRALTYPE_H | ||
90 | 90 | |