• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/language/duchain

  • KDevelop
  • ConstantIntegralType
Public Types | Public Member Functions | Protected Member Functions | List of all members
KDevelop::ConstantIntegralType Class Reference

#include <constantintegraltype.h>

Inheritance diagram for KDevelop::ConstantIntegralType:
Inheritance graph
[legend]

Public Types

enum  { Identity = 14 }
 
using Data = ConstantIntegralTypeData
 
using Ptr = TypePtr< ConstantIntegralType >
 
- Public Types inherited from KDevelop::IntegralType
enum  { Identity = 2 }
 
enum  CommonIntegralTypes {
  TypeVoid, TypeNone, TypeNull, TypeChar,
  TypeBoolean, TypeByte, TypeSbyte, TypeShort,
  TypeInt, TypeLong, TypeFloat, TypeDouble,
  TypeWchar_t, TypeString, TypeMixed, TypeChar16_t,
  TypeChar32_t, TypeLanguageSpecific = 200
}
 
using Data = IntegralTypeData
 
using Ptr = TypePtr< IntegralType >
 
- Public Types inherited from KDevelop::AbstractType
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

 ConstantIntegralType (const ConstantIntegralType &rhs)
 
 ConstantIntegralType (ConstantIntegralTypeData &data)
 
 ConstantIntegralType (uint type=TypeNone)
 
KDevelop::AbstractType * clone () const override
 
bool equals (const KDevelop::AbstractType *rhs) const override
 
uint hash () const override
 
ConstantIntegralType & operator= (const ConstantIntegralType &rhs)=delete
 
qint64 plainValue () const
 
template<class ValueType >
void setValue (ValueType value)
 
QString toString () const override
 
template<class ValueType >
ValueType value () const
 
QString valueAsString () const
 
- Public Member Functions inherited from KDevelop::IntegralType
 IntegralType (const IntegralType &rhs)
 
 IntegralType (IntegralTypeData &data)
 
 IntegralType (uint type=TypeNone)
 
 ~IntegralType () override
 
AbstractType * clone () const override
 
uint dataType () const
 
bool equals (const AbstractType *rhs) const override
 
uint hash () const override
 
IntegralType & operator= (const IntegralType &rhs)=delete
 
void setDataType (uint dataType)
 
QString toString () const override
 
WhichType whichType () const override
 
- Public Member Functions inherited from KDevelop::AbstractType
 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
 
- Public Member Functions inherited from QSharedData
 QSharedData ()
 
 QSharedData (const QSharedData &other)
 

Protected Member Functions

 TYPE_DECLARE_DATA (ConstantIntegralType)
 
- Protected Member Functions inherited from KDevelop::IntegralType
void accept0 (TypeVisitor *v) const override
 
- Protected Member Functions inherited from KDevelop::AbstractType
QString toString (bool spaceOnLeft) const
 

Additional Inherited Members

- Static Public Member Functions inherited from KDevelop::AbstractType
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 ()
 
- Protected Attributes inherited from KDevelop::AbstractType
AbstractTypeData * d_ptr
 

Detailed Description

Definition at line 37 of file constantintegraltype.h.

Member Typedef Documentation

◆ Data

using KDevelop::ConstantIntegralType::Data = ConstantIntegralTypeData

Definition at line 102 of file constantintegraltype.h.

◆ Ptr

using KDevelop::ConstantIntegralType::Ptr = TypePtr<ConstantIntegralType>

Definition at line 49 of file constantintegraltype.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Identity 

Definition at line 98 of file constantintegraltype.h.

Constructor & Destructor Documentation

◆ ConstantIntegralType() [1/3]

KDevelop::ConstantIntegralType::ConstantIntegralType ( const ConstantIntegralType &  rhs)

Definition at line 31 of file constantintegraltype.cpp.

◆ ConstantIntegralType() [2/3]

KDevelop::ConstantIntegralType::ConstantIntegralType ( ConstantIntegralTypeData &  data)
explicit

Definition at line 36 of file constantintegraltype.cpp.

◆ ConstantIntegralType() [3/3]

KDevelop::ConstantIntegralType::ConstantIntegralType ( uint  type = TypeNone)
explicit

Definition at line 41 of file constantintegraltype.cpp.

Member Function Documentation

◆ clone()

AbstractType * KDevelop::ConstantIntegralType::clone ( ) const
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 53 of file constantintegraltype.cpp.

◆ equals()

bool KDevelop::ConstantIntegralType::equals ( const KDevelop::AbstractType *  rhs) const
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 58 of file constantintegraltype.cpp.

◆ hash()

uint KDevelop::ConstantIntegralType::hash ( ) const
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 144 of file constantintegraltype.cpp.

◆ operator=()

ConstantIntegralType& KDevelop::ConstantIntegralType::operator= ( const ConstantIntegralType &  rhs)
delete

◆ plainValue()

qint64 KDevelop::ConstantIntegralType::plainValue ( ) const

Definition at line 48 of file constantintegraltype.cpp.

◆ setValue()

template<class ValueType >
void KDevelop::ConstantIntegralType::setValue ( ValueType  value)
inline

The types and modifiers are not changed! The values are casted internally to the local representation, so you can lose precision.

Definition at line 55 of file constantintegraltype.h.

◆ toString()

QString KDevelop::ConstantIntegralType::toString ( ) const
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 73 of file constantintegraltype.cpp.

◆ TYPE_DECLARE_DATA()

KDevelop::ConstantIntegralType::TYPE_DECLARE_DATA ( ConstantIntegralType  )
protected

◆ value()

template<class ValueType >
ValueType KDevelop::ConstantIntegralType::value ( ) const
inline

For booleans, the value is 1 for true, and 0 for false.

All signed values should be retrieved and set through value(),

Definition at line 73 of file constantintegraltype.h.

◆ valueAsString()

QString KDevelop::ConstantIntegralType::valueAsString ( ) const

Definition at line 116 of file constantintegraltype.cpp.


The documentation for this class was generated from the following files:
  • constantintegraltype.h
  • constantintegraltype.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:18 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal