kdevplatform/language/duchain
#include <delayedtype.h>

Public Types | |
enum | { Identity = 8 } |
using | Data = DelayedTypeData |
enum | Kind : quint8 { Delayed, Unresolved } |
using | Ptr = TypePtr< DelayedType > |
![]() | |
enum | { Identity = 1 } |
enum | CommonModifiers : quint32 { NoModifiers = 0, ConstModifier = 1 << 0, VolatileModifier = 1 << 1, TransientModifier = 1 << 2, NewModifier = 1 << 3, SealedModifier = 1 << 4, UnsafeModifier = 1 << 5, FixedModifier = 1 << 6, ShortModifier = 1 << 7, LongModifier = 1 << 8, LongLongModifier = 1 << 9, SignedModifier = 1 << 10, UnsignedModifier = 1 << 11, LanguageSpecificModifier = 1 << 12 } |
using | Data = AbstractTypeData |
using | Ptr = TypePtr< AbstractType > |
enum | WhichType : quint8 { TypeAbstract, TypeIntegral, TypePointer, TypeReference, TypeFunction, TypeStructure, TypeArray, TypeDelayed, TypeEnumeration, TypeEnumerator, TypeAlias, TypeUnsure } |
Public Member Functions | |
DelayedType () | |
DelayedType (const DelayedType &rhs) | |
DelayedType (DelayedTypeData &data) | |
~DelayedType () override | |
AbstractType * | clone () const override |
bool | equals (const AbstractType *rhs) const override |
uint | hash () const override |
KDevelop::IndexedTypeIdentifier | identifier () const |
Kind | kind () const |
DelayedType & | operator= (const DelayedType &rhs)=delete |
void | setIdentifier (const KDevelop::IndexedTypeIdentifier &identifier) |
void | setKind (Kind kind) |
QString | toString () const override |
WhichType | whichType () const override |
![]() | |
AbstractType () | |
AbstractType (AbstractTypeData &dd) | |
AbstractType (const AbstractType &rhs)=delete | |
virtual | ~AbstractType () |
void | accept (TypeVisitor *v) const |
int64_t | alignOf () const |
virtual void | exchangeTypes (TypeExchanger *exchanger) |
IndexedType | indexed () const |
void | makeDynamic () |
quint32 | modifiers () const |
AbstractType & | operator= (const AbstractType &rhs)=delete |
void | setAlignOf (int64_t alignedTo) |
void | setModifiers (quint32 modifiers) |
void | setSizeOf (int64_t sizeOf) |
int64_t | sizeOf () const |
![]() | |
QSharedData () | |
QSharedData (const QSharedData &other) | |
Protected Member Functions | |
void | accept0 (KDevelop::TypeVisitor *v) const override |
![]() | |
QString | toString (bool spaceOnLeft) const |
Additional Inherited Members | |
![]() | |
static void | acceptType (AbstractType::Ptr type, TypeVisitor *v) |
template<class Type > | |
static Type::Data & | copyData (const typename Type::Data &rhs) |
template<class DataType > | |
static DataType & | copyDataDirectly (const DataType &rhs) |
template<class Type > | |
static Type::Data & | createData () |
![]() | |
AbstractTypeData * | d_ptr |
Detailed Description
A type which has not yet been resolved.
Delayed types can be used for any types that cannot be resolved in the moment they are encountered. They can be used for example in template-classes, or to store the names of unresolved types. In a template-class, many types can not be evaluated at the time they are used, because they depend on unknown template-parameters. Delayed types store the way the type would be searched, and can be used to find the type once the template-paremeters have values.
Definition at line 38 of file delayedtype.h.
Member Typedef Documentation
◆ Data
Definition at line 92 of file delayedtype.h.
◆ Ptr
using KDevelop::DelayedType::Ptr = TypePtr<DelayedType> |
Definition at line 42 of file delayedtype.h.
Member Enumeration Documentation
◆ anonymous enum
anonymous enum |
Enumerator | |
---|---|
Identity |
Definition at line 88 of file delayedtype.h.
◆ Kind
enum KDevelop::DelayedType::Kind : quint8 |
An enumeration of.
Enumerator | |
---|---|
Delayed | The type should be resolved later. This is the default. |
Unresolved | The type could not be resolved. |
Definition at line 45 of file delayedtype.h.
Constructor & Destructor Documentation
◆ DelayedType() [1/3]
KDevelop::DelayedType::DelayedType | ( | ) |
Default constructor.
Definition at line 77 of file delayedtype.cpp.
◆ DelayedType() [2/3]
KDevelop::DelayedType::DelayedType | ( | const DelayedType & | rhs | ) |
◆ DelayedType() [3/3]
|
explicit |
Constructor using raw data.
- Parameters
-
data internal data.
Definition at line 33 of file delayedtype.cpp.
◆ ~DelayedType()
|
override |
Destructor.
Definition at line 86 of file delayedtype.cpp.
Member Function Documentation
◆ accept0()
|
overrideprotectedvirtual |
Visitor method, reimplement to allow visiting of types.
- Parameters
-
v visitor which is visiting.
Implements KDevelop::AbstractType.
Definition at line 100 of file delayedtype.cpp.
◆ clone()
|
overridevirtual |
Should create a clone of the source-type, with as much data copied as possible without breaking the du-chain.
Implements KDevelop::AbstractType.
Definition at line 37 of file delayedtype.cpp.
◆ equals()
|
overridevirtual |
Should return whether this type's content equals the given one Since this is used by the type-repository, it must compare ALL members of the data type.
Reimplemented from KDevelop::AbstractType.
Definition at line 42 of file delayedtype.cpp.
◆ hash()
|
overridevirtual |
A hash-value that should have the following properties:
- When two types match on equals(), it should be same.
- When two types don't match on equals(), it should be different with a high probability.
Reimplemented from KDevelop::AbstractType.
Definition at line 111 of file delayedtype.cpp.
◆ identifier()
IndexedTypeIdentifier KDevelop::DelayedType::identifier | ( | ) | const |
Access the type identifier which this type represents.
- Returns
- the type identifier.
Definition at line 95 of file delayedtype.cpp.
◆ kind()
DelayedType::Kind KDevelop::DelayedType::kind | ( | ) | const |
Definition at line 67 of file delayedtype.cpp.
◆ operator=()
|
delete |
◆ setIdentifier()
void KDevelop::DelayedType::setIdentifier | ( | const KDevelop::IndexedTypeIdentifier & | identifier | ) |
Set the type identifier which this type represents.
- Parameters
-
identifier the type identifier.
Definition at line 90 of file delayedtype.cpp.
◆ setKind()
void KDevelop::DelayedType::setKind | ( | Kind | kind | ) |
Definition at line 72 of file delayedtype.cpp.
◆ toString()
|
overridevirtual |
Returns this type as a string, preferably the same as it is expressed in the code.
- Returns
- this type as a string
Reimplemented from KDevelop::AbstractType.
Definition at line 62 of file delayedtype.cpp.
◆ whichType()
|
overridevirtual |
Determine which data type this abstract type represents.
- Returns
- the data type represented by this type.
Reimplemented from KDevelop::AbstractType.
Definition at line 57 of file delayedtype.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:28 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.