clang 20.0.0git
Public Member Functions | Friends | List of all members
clang::api_notes::ContextInfo Class Reference

Describes API notes data for an Objective-C class or protocol or a C++ namespace. More...

#include "clang/APINotes/Types.h"

Inheritance diagram for clang::api_notes::ContextInfo:
Inheritance graph
[legend]

Public Member Functions

 ContextInfo ()
 
std::optional< NullabilityKindgetDefaultNullability () const
 Determine the default nullability for properties and methods of this class.
 
void setDefaultNullability (NullabilityKind Kind)
 Set the default nullability for properties and methods of this class.
 
bool hasDesignatedInits () const
 
void setHasDesignatedInits (bool Value)
 
std::optional< boolgetSwiftImportAsNonGeneric () const
 
void setSwiftImportAsNonGeneric (std::optional< bool > Value)
 
std::optional< boolgetSwiftObjCMembers () const
 
void setSwiftObjCMembers (std::optional< bool > Value)
 
ContextInfooperator|= (const ContextInfo &RHS)
 
LLVM_DUMP_METHOD void dump (llvm::raw_ostream &OS)
 
- Public Member Functions inherited from clang::api_notes::CommonTypeInfo
 CommonTypeInfo ()
 
const std::optional< std::string > & getSwiftBridge () const
 
void setSwiftBridge (std::optional< std::string > SwiftType)
 
const std::optional< std::string > & getNSErrorDomain () const
 
void setNSErrorDomain (const std::optional< std::string > &Domain)
 
void setNSErrorDomain (const std::optional< llvm::StringRef > &Domain)
 
CommonTypeInfooperator|= (const CommonTypeInfo &RHS)
 
LLVM_DUMP_METHOD void dump (llvm::raw_ostream &OS) const
 
- Public Member Functions inherited from clang::api_notes::CommonEntityInfo
 CommonEntityInfo ()
 
std::optional< boolisSwiftPrivate () const
 
void setSwiftPrivate (std::optional< bool > Private)
 
CommonEntityInfooperator|= (const CommonEntityInfo &RHS)
 
LLVM_DUMP_METHOD void dump (llvm::raw_ostream &OS) const
 

Friends

bool operator== (const ContextInfo &, const ContextInfo &)
 

Additional Inherited Members

- Public Attributes inherited from clang::api_notes::CommonEntityInfo
std::string UnavailableMsg
 Message to use when this entity is unavailable.
 
unsigned Unavailable: 1
 Whether this entity is marked unavailable.
 
unsigned UnavailableInSwift: 1
 Whether this entity is marked unavailable in Swift.
 
std::string SwiftName
 Swift name of this entity.
 

Detailed Description

Describes API notes data for an Objective-C class or protocol or a C++ namespace.

Definition at line 197 of file Types.h.

Constructor & Destructor Documentation

◆ ContextInfo()

clang::api_notes::ContextInfo::ContextInfo ( )
inline

Definition at line 221 of file Types.h.

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void clang::api_notes::ContextInfo::dump ( llvm::raw_ostream &  OS)

Definition at line 35 of file APINotesTypes.cpp.

References clang::api_notes::CommonTypeInfo::dump().

◆ getDefaultNullability()

std::optional< NullabilityKind > clang::api_notes::ContextInfo::getDefaultNullability ( ) const
inline

Determine the default nullability for properties and methods of this class.

Returns the default nullability, if implied, or std::nullopt if there is none.

Definition at line 231 of file Types.h.

Referenced by operator|=(), clang::api_notes::ObjCPropertyInfo::operator|=(), and clang::api_notes::ObjCMethodInfo::operator|=().

◆ getSwiftImportAsNonGeneric()

std::optional< bool > clang::api_notes::ContextInfo::getSwiftImportAsNonGeneric ( ) const
inline

Definition at line 247 of file Types.h.

Referenced by operator|=(), and ProcessAPINotes().

◆ getSwiftObjCMembers()

std::optional< bool > clang::api_notes::ContextInfo::getSwiftObjCMembers ( ) const
inline

Definition at line 257 of file Types.h.

Referenced by operator|=(), and ProcessAPINotes().

◆ hasDesignatedInits()

bool clang::api_notes::ContextInfo::hasDesignatedInits ( ) const
inline

Definition at line 244 of file Types.h.

◆ operator|=()

ContextInfo & clang::api_notes::ContextInfo::operator|= ( const ContextInfo RHS)
inline

◆ setDefaultNullability()

void clang::api_notes::ContextInfo::setDefaultNullability ( NullabilityKind  Kind)
inline

Set the default nullability for properties and methods of this class.

Definition at line 239 of file Types.h.

References Kind.

Referenced by operator|=().

◆ setHasDesignatedInits()

void clang::api_notes::ContextInfo::setHasDesignatedInits ( bool  Value)
inline

Definition at line 245 of file Types.h.

◆ setSwiftImportAsNonGeneric()

void clang::api_notes::ContextInfo::setSwiftImportAsNonGeneric ( std::optional< bool Value)
inline

Definition at line 252 of file Types.h.

Referenced by operator|=().

◆ setSwiftObjCMembers()

void clang::api_notes::ContextInfo::setSwiftObjCMembers ( std::optional< bool Value)
inline

Definition at line 261 of file Types.h.

Referenced by operator|=().

Friends And Related Function Documentation

◆ operator==

bool operator== ( const ContextInfo LHS,
const ContextInfo RHS 
)
friend

Definition at line 291 of file Types.h.


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