class ObjCObjectPointerType

Declaration

class ObjCObjectPointerType : public Type, public Node { /* full declaration omitted */ };

Description

Represents a pointer to an Objective C object. These are constructed from pointer declarators when the pointee type is an ObjCObjectType (or sugar for one). In addition, the 'id' and 'Class' types are typedefs for these, and the protocol-qualified types 'id <P >' and 'Class <P >' are translated into these. Pointers to pointers to Objective C objects are still PointerTypes; only the first level of pointer gets it own type implementation.

Declared at: clang/include/clang/AST/Type.h:6207

Inherits from: Type, FoldingSetBase::Node

Member Variables

private clang::QualType PointeeType

Inherited from Type:

protected

Method Overview

Inherited from FoldingSetBase::Node:

Inherited from Type:

Inherited from ExtQualsTypeCommonBase:

    Methods

    ObjCObjectPointerType(clang::QualType Canonical,
                          clang::QualType Pointee)

    Declared at: clang/include/clang/AST/Type.h:6212

    Parameters

    clang::QualType Canonical
    clang::QualType Pointee

    static void Profile(llvm::FoldingSetNodeID& ID,
                        clang::QualType T)

    Declared at: clang/include/clang/AST/Type.h:6368

    Parameters

    llvm::FoldingSetNodeID& ID
    clang::QualType T

    void Profile(llvm::FoldingSetNodeID& ID)

    Declared at: clang/include/clang/AST/Type.h:6364

    Parameters

    llvm::FoldingSetNodeID& ID

    static bool classof(const clang::Type* T)

    Declared at: clang/include/clang/AST/Type.h:6372

    Parameters

    const clang::Type* T

    clang::QualType desugar() const

    Declared at: clang/include/clang/AST/Type.h:6349

    clang::ObjCInterfaceDecl* getInterfaceDecl() const

    Description

    If this pointer points to an Objective @ interface type, gets the declaration for that interface.

    Declared at: clang/include/clang/AST/Type.h:6259

    Returns

    null if the base type for this pointer is 'id' or 'Class'

    const clang::ObjCInterfaceType* getInterfaceType()
        const

    Description

    If this pointer points to an Objective C @ interface type, gets the type for that interface. Any protocol qualifiers on the interface are ignored.

    Declared at: clang/include/clang/AST/Type.h:6253

    Returns

    null if the base type for this pointer is 'id' or 'Class'

    unsigned int getNumProtocols() const

    Description

    Return the number of qualifying protocols on the object type.

    Declared at: clang/include/clang/AST/Type.h:6339

    const clang::ObjCObjectType* getObjectType() const

    Description

    Gets the type pointed to by this ObjC pointer. Always returns non-null. This method is equivalent to getPointeeType() except that it discards any typedefs (or other sugar) between this type and the "outermost" object type. So for: For 'A*', getObjectType() will return 'A'. For 'A <P >*', getObjectType() will return 'A <P >'. For 'AP*', getObjectType() will return 'A <P >'. For 'A1*', getObjectType() will return 'A'. For 'A1 <P >*', getObjectType() will return 'A1 <P >'. For 'A1P*', getObjectType() will return 'A1 <P >'. For 'A1PQ*', getObjectType() will return 'A1 <Q >', because adding protocols to a protocol-qualified base discards the old qualifiers (for now). But if it didn't, getObjectType() would return 'A1P <Q >' (and we'd have to make iterating over qualifiers more complicated).

    Declared at: clang/include/clang/AST/Type.h:6244

    clang::QualType getPointeeType() const

    Description

    Gets the type pointed to by this ObjC pointer. The result will always be an ObjCObjectType or sugar thereof.

    Declared at: clang/include/clang/AST/Type.h:6219

    clang::ObjCProtocolDecl* getProtocol(
        unsigned int I) const

    Description

    Retrieve a qualifying protocol by index on the object type.

    Declared at: clang/include/clang/AST/Type.h:6344

    Parameters

    unsigned int I

    clang::QualType getSuperClassType() const

    Description

    Retrieve the type of the superclass of this object pointer type. This operation substitutes any type arguments into the superclass of the current class type, potentially producing a pointer to a specialization of the superclass type. Produces a null type if there is no superclass.

    Declared at: clang/include/clang/AST/Type.h:6357

    ArrayRef<clang::QualType> getTypeArgs() const

    Description

    Retrieve the type arguments for this type.

    Declared at: clang/include/clang/AST/Type.h:6311

    ArrayRef<clang::QualType> getTypeArgsAsWritten()
        const

    Description

    Retrieve the type arguments for this type.

    Declared at: clang/include/clang/AST/Type.h:6316

    bool isKindOfType() const

    Description

    Whether this is a "__kindof" type.

    Declared at: clang/include/clang/AST/Type.h:6293

    bool isObjCClassType() const

    Description

    True if this is equivalent to the 'Class' type, i.e. if its object tive is the primitive 'Class' type with no protocols.

    Declared at: clang/include/clang/AST/Type.h:6271

    bool isObjCIdOrClassType() const

    Description

    True if this is equivalent to the 'id' or 'Class' type,

    Declared at: clang/include/clang/AST/Type.h:6276

    bool isObjCIdType() const

    Description

    True if this is equivalent to the 'id' type, i.e. if its object type is the primitive 'id' type with no protocols.

    Declared at: clang/include/clang/AST/Type.h:6265

    bool isObjCQualifiedClassType() const

    Description

    True if this is equivalent to 'Class <P >' for some non-empty set of protocols.

    Declared at: clang/include/clang/AST/Type.h:6288

    bool isObjCQualifiedIdType() const

    Description

    True if this is equivalent to 'id <P >' for some non-empty set of protocols.

    Declared at: clang/include/clang/AST/Type.h:6282

    bool isSpecialized() const

    Description

    Whether this type is specialized, meaning that it has type arguments.

    Declared at: clang/include/clang/AST/Type.h:6296

    bool isSpecializedAsWritten() const

    Description

    Whether this type is specialized, meaning that it has type arguments.

    Declared at: clang/include/clang/AST/Type.h:6299

    bool isSugared() const

    Declared at: clang/include/clang/AST/Type.h:6348

    bool isUnspecialized() const

    Description

    Whether this type is unspecialized, meaning that is has no type arguments.

    Declared at: clang/include/clang/AST/Type.h:6304

    bool isUnspecializedAsWritten() const

    Description

    Determine whether this object type is "unspecialized" as written, meaning that it has no type arguments.

    Declared at: clang/include/clang/AST/Type.h:6308

    clang::ObjCObjectPointerType::qual_iterator
    qual_begin() const

    Declared at: clang/include/clang/AST/Type.h:6328

    bool qual_empty() const

    Declared at: clang/include/clang/AST/Type.h:6336

    clang::ObjCObjectPointerType::qual_iterator
    qual_end() const

    Declared at: clang/include/clang/AST/Type.h:6332

    clang::ObjCObjectPointerType::qual_range quals()
        const

    Declared at: clang/include/clang/AST/Type.h:6326

    const clang::ObjCObjectPointerType*
    stripObjCKindOfTypeAndQuals(
        const clang::ASTContext& ctx) const

    Description

    Strip off the Objective-C "kindof" type and (with it) any protocol qualifiers.

    Declared at: clang/include/clang/AST/Type.h:6361

    Parameters

    const clang::ASTContext& ctx