language/duchain
KDevelop::PointerType Class Reference
A type representing pointer types. More...
#include <pointertype.h>

Public Types | |
| enum | { Identity = 3 } |
| typedef PointerTypeData | Data |
| typedef TypePtr< PointerType > | Ptr |
Public Member Functions | |
| PointerType (PointerTypeData &data) | |
| PointerType (const PointerType &rhs) | |
| PointerType () | |
| virtual | ~PointerType () |
| AbstractType::Ptr | baseType () const |
| virtual AbstractType * | clone () const |
| virtual bool | equals (const AbstractType *rhs) const |
| virtual void | exchangeTypes (TypeExchanger *exchanger) |
| virtual uint | hash () const |
| void | setBaseType (AbstractType::Ptr type) |
| virtual QString | toString () const |
| virtual WhichType | whichType () const |
Protected Member Functions | |
| virtual void | accept0 (TypeVisitor *v) const |
Detailed Description
A type representing pointer types.
PointerType is used to represent types which hold a pointer to a location in memory.
Definition at line 36 of file pointertype.h.
Constructor & Destructor Documentation
| KDevelop::PointerType::PointerType | ( | ) |
Default constructor.
Definition at line 59 of file pointertype.cpp.
| KDevelop::PointerType::PointerType | ( | const PointerType & | rhs | ) |
| KDevelop::PointerType::PointerType | ( | PointerTypeData & | data | ) |
Constructor using raw data.
- Parameters:
-
data internal data.
Definition at line 37 of file pointertype.cpp.
| KDevelop::PointerType::~PointerType | ( | ) | [virtual] |
Destructor.
Definition at line 76 of file pointertype.cpp.
Member Function Documentation
| void KDevelop::PointerType::accept0 | ( | TypeVisitor * | v | ) | const [protected, virtual] |
Visitor method, reimplement to allow visiting of types.
- Parameters:
-
v visitor which is visiting.
Implements KDevelop::AbstractType.
Definition at line 64 of file pointertype.cpp.
| AbstractType::Ptr KDevelop::PointerType::baseType | ( | ) | const |
Retrieve the base type of the pointer, ie.
what type of data the pointer points to.
- Returns:
- the base type.
Definition at line 80 of file pointertype.cpp.
| AbstractType * KDevelop::PointerType::clone | ( | ) | const [virtual] |
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 40 of file pointertype.cpp.
| void KDevelop::PointerType::exchangeTypes | ( | TypeExchanger * | exchanger | ) | [virtual] |
Should, like accept0, be implemented by all types that hold references to other types.
If this is called on one type, that type should call exchangeTypes(..) with all its referenced sub-types. The type itself does not recurse into the sub-types, that can be done by the exchanger itself if desired.
Reimplemented from KDevelop::AbstractType.
Definition at line 72 of file pointertype.cpp.
| uint KDevelop::PointerType::hash | ( | ) | const [virtual] |
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 101 of file pointertype.cpp.
| void KDevelop::PointerType::setBaseType | ( | AbstractType::Ptr | type | ) |
Sets the base type of the pointer, ie.
what type of data the pointer points to.
- Parameters:
-
baseType the base type.
Definition at line 85 of file pointertype.cpp.
| QString KDevelop::PointerType::toString | ( | ) | const [virtual] |
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 90 of file pointertype.cpp.
| AbstractType::WhichType KDevelop::PointerType::whichType | ( | ) | const [virtual] |
Determine which data type this abstract type represents.
- Returns:
- the data type represented by this type.
Reimplemented from KDevelop::AbstractType.
Definition at line 96 of file pointertype.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference