clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions
clang::ObjCObjectType Class Reference

#include <Type.h>

Inheritance diagram for clang::ObjCObjectType:
Inheritance graph
[legend]
Collaboration diagram for clang::ObjCObjectType:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ObjCProtocolDecl *const * qual_iterator
typedef llvm::iterator_range
< qual_iterator
qual_range

Public Member Functions

QualType getBaseType () const
bool isObjCId () const
bool isObjCClass () const
bool isObjCUnqualifiedId () const
bool isObjCUnqualifiedClass () const
bool isObjCUnqualifiedIdOrClass () const
bool isObjCQualifiedId () const
bool isObjCQualifiedClass () const
ObjCInterfaceDeclgetInterface () const
qual_range quals () const
qual_iterator qual_begin () const
qual_iterator qual_end () const
bool qual_empty () const
unsigned getNumProtocols () const
ObjCProtocolDeclgetProtocol (unsigned I) const
 Fetch a protocol by index.
bool isSugared () const
QualType desugar () const

Static Public Member Functions

static bool classof (const Type *T)

Protected Types

enum  Nonce_ObjCInterface { Nonce_ObjCInterface }

Protected Member Functions

 ObjCObjectType (QualType Canonical, QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols)
 ObjCObjectType (enum Nonce_ObjCInterface)

Detailed Description

ObjCObjectType - Represents a class type in Objective C. Every Objective C type is a combination of a base type and a list of protocols.

Given the following declarations:

   \@class C;
   \@protocol P;

'C' is an ObjCInterfaceType C. It is sugar for an ObjCObjectType with base C and no protocols.

'C

' is an ObjCObjectType with base C and protocol list [P].

'id' is a TypedefType which is sugar for an ObjCObjectPointerType whose pointee is an ObjCObjectType with base BuiltinType::ObjCIdType and no protocols.

'id

' is an ObjCObjectPointerType whose pointee is an ObjCObjectType with base BuiltinType::ObjCIdType and protocol list [P]. Eventually this should get its own sugar class to better represent the source.

Definition at line 4310 of file Type.h.


Member Typedef Documentation

Reimplemented in clang::ObjCInterfaceType.

Definition at line 4372 of file Type.h.

typedef llvm::iterator_range<qual_iterator> clang::ObjCObjectType::qual_range

Definition at line 4373 of file Type.h.


Member Enumeration Documentation

Enumerator:
Nonce_ObjCInterface 

Definition at line 4334 of file Type.h.


Constructor & Destructor Documentation

ObjCObjectType::ObjCObjectType ( QualType  Canonical,
QualType  Base,
ObjCProtocolDecl *const *  Protocols,
unsigned  NumProtocols 
) [protected]

Definition at line 472 of file Type.cpp.

References getNumProtocols(), and clang::Type::ObjCObjectTypeBits.

clang::ObjCObjectType::ObjCObjectType ( enum  Nonce_ObjCInterface) [inline, protected]

Definition at line 4335 of file Type.h.


Member Function Documentation

static bool clang::ObjCObjectType::classof ( const Type T) [inline, static]

Reimplemented in clang::ObjCInterfaceType.

Definition at line 4394 of file Type.h.

References clang::Type::getTypeClass().

Reimplemented in clang::ObjCInterfaceType.

Definition at line 4392 of file Type.h.

getBaseType - Gets the base type of this object type. This is always (possibly sugar for) one of:

Definition at line 4348 of file Type.h.

Referenced by clang::ObjCObjectPointerType::getInterfaceType(), IsStructurallyEquivalent(), clang::ObjCObjectTypeImpl::Profile(), and clang::ASTNodeImporter::VisitObjCObjectType().

getNumProtocols - Return the number of qualifying protocols in this interface type, or 0 if there are none.

Definition at line 4383 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces(), getIntersectionOfProtocols(), IsStructurallyEquivalent(), ObjCObjectType(), and clang::ObjCObjectTypeImpl::Profile().

Fetch a protocol by index.

Definition at line 4386 of file Type.h.

Referenced by IsStructurallyEquivalent().

Definition at line 4366 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces().

Definition at line 4365 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces().

Definition at line 4357 of file Type.h.

Definition at line 4356 of file Type.h.

Definition at line 4358 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces().

Reimplemented in clang::ObjCInterfaceType.

Definition at line 4391 of file Type.h.

Definition at line 4376 of file Type.h.

Referenced by getIntersectionOfProtocols(), and clang::ObjCObjectTypeImpl::Profile().

Definition at line 4379 of file Type.h.

Referenced by clang::Sema::CheckObjCForCollectionOperand().

Definition at line 4377 of file Type.h.

Referenced by getIntersectionOfProtocols().


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