language/duchain
KDevelop::IntegralType Class Reference
A type representing inbuilt data types. More...
#include <integraltype.h>

Public Types | |
| enum | { Identity = 2 } |
| enum | CommonIntegralTypes { TypeVoid, TypeNone, TypeNull, TypeChar, TypeBoolean, TypeByte, TypeSbyte, TypeShort, TypeInt, TypeLong, TypeFloat, TypeDouble, TypeWchar_t, TypeString, TypeMixed, TypeLanguageSpecific = 200 } |
| typedef IntegralTypeData | Data |
| typedef TypePtr< IntegralType > | Ptr |
Public Member Functions | |
| IntegralType (IntegralTypeData &data) | |
| IntegralType (const IntegralType &rhs) | |
| IntegralType (uint type=TypeNone) | |
| virtual | ~IntegralType () |
| virtual AbstractType * | clone () const |
| uint | dataType () const |
| virtual bool | equals (const AbstractType *rhs) const |
| virtual uint | hash () const |
| void | setDataType (uint dataType) |
| virtual QString | toString () const |
| virtual WhichType | whichType () const |
Protected Member Functions | |
| virtual void | accept0 (TypeVisitor *v) const |
Detailed Description
A type representing inbuilt data types.
IntegralType is used to represent types which are native to a programming languge, such as (e.g.) int, float, double, char, bool etc.
Definition at line 38 of file integraltype.h.
Member Enumeration Documentation
Enumeration of frequently used integral types.
If your language has another integral type not listed here, you can create custom types staring from TypeLanguageSpecific.
Definition at line 48 of file integraltype.h.
Constructor & Destructor Documentation
| KDevelop::IntegralType::IntegralType | ( | uint | type = TypeNone |
) |
Default constructor.
Definition at line 68 of file integraltype.cpp.
| KDevelop::IntegralType::IntegralType | ( | const IntegralType & | rhs | ) |
| KDevelop::IntegralType::IntegralType | ( | IntegralTypeData & | data | ) |
Constructor using raw data.
- Parameters:
-
data internal data.
Definition at line 36 of file integraltype.cpp.
| KDevelop::IntegralType::~IntegralType | ( | ) | [virtual] |
Destructor.
Definition at line 75 of file integraltype.cpp.
Member Function Documentation
| void KDevelop::IntegralType::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 137 of file integraltype.cpp.
| AbstractType * KDevelop::IntegralType::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 49 of file integraltype.cpp.
| uint KDevelop::IntegralType::dataType | ( | ) | const |
Access the integral type.
- Returns:
- the type's modifiers.
Definition at line 39 of file integraltype.cpp.
| uint KDevelop::IntegralType::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 147 of file integraltype.cpp.
| void KDevelop::IntegralType::setDataType | ( | uint | dataType | ) |
Set the type's modifiers.
- Parameters:
-
modifiers modifiers of this type.
Definition at line 44 of file integraltype.cpp.
| QString KDevelop::IntegralType::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 79 of file integraltype.cpp.
| AbstractType::WhichType KDevelop::IntegralType::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 142 of file integraltype.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference