• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

KDevelop::ReferenceType

KDevelop::ReferenceType Class Reference

A type representing reference types. More...

#include <referencetype.h>

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

List of all members.

Public Types

enum  { Identity = 4 }
typedef ReferenceTypeData Data
typedef TypePtr< ReferenceType > Ptr

Public Member Functions

 ReferenceType (ReferenceTypeData &data)
 ReferenceType (const ReferenceType &rhs)
 ReferenceType ()
virtual ~ReferenceType ()
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 baseType)
virtual QString toString () const
virtual WhichType whichType () const

Protected Member Functions

virtual void accept0 (TypeVisitor *v) const

Detailed Description

A type representing reference types.

ReferenceType is used to represent types which hold a reference to a variable.

Definition at line 36 of file referencetype.h.


Constructor & Destructor Documentation

KDevelop::ReferenceType::ReferenceType (  ) 

Default constructor.

Definition at line 60 of file referencetype.cpp.

KDevelop::ReferenceType::ReferenceType ( const ReferenceType &  rhs  ) 

Copy constructor.

Parameters:
rhs type to copy

Definition at line 35 of file referencetype.cpp.

KDevelop::ReferenceType::ReferenceType ( ReferenceTypeData &  data  ) 

Constructor using raw data.

Parameters:
data internal data.

Definition at line 38 of file referencetype.cpp.

KDevelop::ReferenceType::~ReferenceType (  )  [virtual]

Destructor.

Definition at line 65 of file referencetype.cpp.


Member Function Documentation

void KDevelop::ReferenceType::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 79 of file referencetype.cpp.

AbstractType::Ptr KDevelop::ReferenceType::baseType (  )  const

Retrieve the referenced type, ie.

what type of data this type references.

Returns:
the base type.

Definition at line 69 of file referencetype.cpp.

AbstractType * KDevelop::ReferenceType::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 41 of file referencetype.cpp.

void KDevelop::ReferenceType::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 87 of file referencetype.cpp.

uint KDevelop::ReferenceType::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 107 of file referencetype.cpp.

void KDevelop::ReferenceType::setBaseType ( AbstractType::Ptr  baseType  ) 

Sets the referenced type, ie.

what type of data this type references.

Parameters:
baseType the base type.

Definition at line 74 of file referencetype.cpp.

QString KDevelop::ReferenceType::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 92 of file referencetype.cpp.

AbstractType::WhichType KDevelop::ReferenceType::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 102 of file referencetype.cpp.


The documentation for this class was generated from the following files:
  • referencetype.h
  • referencetype.cpp

language/duchain

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal