clang  6.0.0svn
Public Member Functions | Protected Attributes | List of all members
clang::CanProxyBase< T > Class Template Reference

Base class of all canonical proxy types, which is responsible for storing the underlying canonical type and providing basic conversions. More...

#include "clang/AST/CanonicalType.h"

Inheritance diagram for clang::CanProxyBase< T >:
Inheritance graph
[legend]
Collaboration diagram for clang::CanProxyBase< T >:
Collaboration graph
[legend]

Public Member Functions

const TgetTypePtr () const
 Retrieve the pointer to the underlying Type. More...
 
 operator const T * () const
 Implicit conversion to the underlying pointer. More...
 
template<typename U >
CanProxy< U > getAs () const
 Try to convert the given canonical type to a specific structural type. More...
 
const CanProxyAdaptor< T > * operator-> () const
 Retrieve the proxy-adaptor type. More...
 

Protected Attributes

CanQual< TStored
 

Detailed Description

template<typename T>
class clang::CanProxyBase< T >

Base class of all canonical proxy types, which is responsible for storing the underlying canonical type and providing basic conversions.

Definition at line 240 of file CanonicalType.h.

Member Function Documentation

◆ getAs()

template<typename T>
template<typename U >
CanProxy<U> clang::CanProxyBase< T >::getAs ( ) const
inline

Try to convert the given canonical type to a specific structural type.

Definition at line 259 of file CanonicalType.h.

◆ getTypePtr()

template<typename T>
const T* clang::CanProxyBase< T >::getTypePtr ( ) const
inline

Retrieve the pointer to the underlying Type.

Definition at line 246 of file CanonicalType.h.

◆ operator const T *()

template<typename T>
clang::CanProxyBase< T >::operator const T * ( ) const
inline

Implicit conversion to the underlying pointer.

Also provides the ability to use canonical type proxies in a Boolean

if (CanQual<PointerType> Ptr = T->getAs<PointerType>()) { ... }

Definition at line 255 of file CanonicalType.h.

◆ operator->()

template<typename T>
const CanProxyAdaptor<T>* clang::CanProxyBase< T >::operator-> ( ) const
inline

Retrieve the proxy-adaptor type.

This arrow operator is used when CanProxyAdaptor has been specialized for the given type T. In that case, we reference members of the CanProxyAdaptor specialization. Otherwise, this operator will be hidden by the arrow operator in the primary CanProxyAdaptor template.

Definition at line 322 of file CanonicalType.h.

Member Data Documentation

◆ Stored

template<typename T>
CanQual<T> clang::CanProxyBase< T >::Stored
protected

Definition at line 242 of file CanonicalType.h.


The documentation for this class was generated from the following file: