clang  3.7.0
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 <CanonicalType.h>

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

Public Member Functions

const T * getTypePtr () 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< T > Stored
 

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 225 of file CanonicalType.h.

Member Function Documentation

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 244 of file CanonicalType.h.

template<typename T>
const T* clang::CanProxyBase< T >::getTypePtr ( ) const
inline
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 240 of file CanonicalType.h.

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 307 of file CanonicalType.h.

Member Data Documentation

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

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