clang API Documentation
#include <NSAPI.h>
Enumerates the NSDictionary methods used to generate literals.
Enumerates the NSNumber methods used to generate literals.
NSAPI::NSAPI | ( | ASTContext & | Ctx | ) | [explicit] |
ASTContext& clang::NSAPI::getASTContext | ( | ) | const [inline] |
Definition at line 27 of file NSAPI.h.
Referenced by doRewriteToUTF8StringBoxedExpressionHelper(), getNSArrayObjects(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToArrayLiteral(), rewriteToArraySubscriptGet(), rewriteToArraySubscriptSet(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptGet(), rewriteToDictionarySubscriptSet(), rewriteToNSEnumDecl(), rewriteToNumberLiteral(), rewriteToNumericBoxedExpression(), clang::edit::rewriteToObjCLiteralSyntax(), rewriteToObjCProperty(), clang::edit::rewriteToObjCSubscriptSyntax(), and shouldNotRewriteImmediateMessageArgs().
Selector clang::NSAPI::getIsEqualSelector | ( | ) | const [inline] |
Optional< NSAPI::NSArrayMethodKind > NSAPI::getNSArrayMethodKind | ( | Selector | Sel | ) |
Return NSArrayMethodKind if Sel
is such a selector.
Definition at line 134 of file NSAPI.cpp.
References getNSArraySelector(), and NumNSArrayMethods.
Selector NSAPI::getNSArraySelector | ( | NSArrayMethodKind | MK | ) | const |
The Objective-C NSArray selectors.
Definition at line 86 of file NSAPI.cpp.
References clang::IdentifierTable::get(), clang::SelectorTable::getNullarySelector(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSArr_array, NSArr_arrayWithArray, NSArr_arrayWithObject, NSArr_arrayWithObjects, NSArr_arrayWithObjectsCount, NSArr_initWithArray, NSArr_initWithObjects, NSArr_objectAtIndex, NSMutableArr_replaceObjectAtIndex, and clang::ASTContext::Selectors.
Referenced by getNSArrayMethodKind(), getNSArrayObjects(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToArrayLiteral(), and clang::edit::rewriteToObjCSubscriptSyntax().
IdentifierInfo * NSAPI::getNSClassId | ( | NSClassIdKindKind | K | ) | const |
Definition at line 22 of file NSAPI.cpp.
References clang::IdentifierTable::get(), clang::ASTContext::Idents, and NumClassIds.
Referenced by getNSArrayObjects(), clang::edit::rewriteObjCRedundantCallWithLiteral(), clang::edit::rewriteToObjCLiteralSyntax(), and shouldNotRewriteImmediateMessageArgs().
Optional< NSAPI::NSDictionaryMethodKind > NSAPI::getNSDictionaryMethodKind | ( | Selector | Sel | ) |
Return NSDictionaryMethodKind if Sel
is such a selector.
Definition at line 220 of file NSAPI.cpp.
References getNSDictionarySelector(), and NumNSDictionaryMethods.
The Objective-C NSDictionary selectors.
Definition at line 144 of file NSAPI.cpp.
References clang::IdentifierTable::get(), clang::SelectorTable::getNullarySelector(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSDict_dictionary, NSDict_dictionaryWithDictionary, NSDict_dictionaryWithObjectForKey, NSDict_dictionaryWithObjectsAndKeys, NSDict_dictionaryWithObjectsForKeys, NSDict_dictionaryWithObjectsForKeysCount, NSDict_initWithDictionary, NSDict_initWithObjectsAndKeys, NSDict_initWithObjectsForKeys, NSDict_objectForKey, NSMutableDict_setObjectForKey, and clang::ASTContext::Selectors.
Referenced by getNSDictionaryMethodKind(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToDictionaryLiteral(), clang::edit::rewriteToObjCSubscriptSyntax(), and shouldNotRewriteImmediateMessageArgs().
StringRef NSAPI::GetNSIntegralKind | ( | QualType | T | ) | const |
Returns one of NSIntegral typedef names if.
T | is a typedef of that name in objective-c. |
Definition at line 387 of file NSAPI.cpp.
References clang::Type::getAs(), clang::ASTContext::getLangOpts(), and clang::QualType::isNull().
Optional< NSAPI::NSNumberLiteralMethodKind > NSAPI::getNSNumberFactoryMethodKind | ( | QualType | T | ) | const |
Determine the appropriate NSNumber factory method kind for a literal of the given type.
Definition at line 294 of file NSAPI.cpp.
References clang::Type::getAs(), clang::BuiltinType::getKind(), isObjCBOOLType(), isObjCNSIntegerType(), isObjCNSUIntegerType(), NSNumberWithBool, NSNumberWithChar, NSNumberWithDouble, NSNumberWithFloat, NSNumberWithInt, NSNumberWithInteger, NSNumberWithLong, NSNumberWithLongLong, NSNumberWithShort, NSNumberWithUnsignedChar, NSNumberWithUnsignedInt, NSNumberWithUnsignedInteger, NSNumberWithUnsignedLong, NSNumberWithUnsignedLongLong, and NSNumberWithUnsignedShort.
Optional< NSAPI::NSNumberLiteralMethodKind > NSAPI::getNSNumberLiteralMethodKind | ( | Selector | Sel | ) | const |
Return NSNumberLiteralMethodKind if Sel
is such a selector.
Definition at line 283 of file NSAPI.cpp.
References isNSNumberLiteralSelector(), and NumNSNumberLiteralMethods.
Referenced by rewriteToNumberLiteral(), and rewriteToNumericBoxedExpression().
Selector NSAPI::getNSNumberLiteralSelector | ( | NSNumberLiteralMethodKind | MK, |
bool | Instance | ||
) | const |
The Objective-C NSNumber selectors used to create NSNumber literals.
Instance | if true it will return the selector for the init* method otherwise it will return the selector for the number* method. |
Definition at line 230 of file NSAPI.cpp.
References clang::IdentifierTable::get(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NumNSNumberLiteralMethods, and clang::ASTContext::Selectors.
Referenced by isNSNumberLiteralSelector().
Optional< NSAPI::NSStringMethodKind > NSAPI::getNSStringMethodKind | ( | Selector | Sel | ) | const |
Return NSStringMethodKind if.
Sel | is such a selector. |
Definition at line 76 of file NSAPI.cpp.
References getNSStringSelector(), and NumNSStringMethods.
Selector NSAPI::getNSStringSelector | ( | NSStringMethodKind | MK | ) | const |
The Objective-C NSString selectors.
Definition at line 39 of file NSAPI.cpp.
References clang::IdentifierTable::get(), clang::SelectorTable::getSelector(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::Idents, NSStr_initWithString, NSStr_initWithUTF8String, NSStr_stringWithCString, NSStr_stringWithCStringEncoding, NSStr_stringWithString, NSStr_stringWithUTF8String, and clang::ASTContext::Selectors.
Referenced by getNSStringMethodKind(), clang::edit::rewriteObjCRedundantCallWithLiteral(), and rewriteToStringBoxedExpression().
Selector clang::NSAPI::getObjectAtIndexedSubscriptSelector | ( | ) | const [inline] |
Returns selector for "objectAtIndexedSubscript:".
Definition at line 119 of file NSAPI.h.
Referenced by rewriteToArraySubscriptGet().
Selector clang::NSAPI::getObjectForKeyedSubscriptSelector | ( | ) | const [inline] |
Returns selector for "objectForKeyedSubscript:".
Definition at line 113 of file NSAPI.h.
Referenced by rewriteToDictionarySubscriptGet().
Selector clang::NSAPI::getSetObjectAtIndexedSubscriptSelector | ( | ) | const [inline] |
Returns selector for "setObject:atIndexedSubscript".
Definition at line 131 of file NSAPI.h.
Referenced by rewriteToArraySubscriptSet().
Selector clang::NSAPI::getSetObjectForKeyedSubscriptSelector | ( | ) | const [inline] |
Returns selector for "setObject:forKeyedSubscript".
Definition at line 125 of file NSAPI.h.
Referenced by rewriteToDictionarySubscriptSet().
bool clang::NSAPI::isNSASCIIStringEncodingConstant | ( | const Expr * | E | ) | const [inline] |
Returns true if the expression.
E | is a reference of "NSASCIIStringEncoding" enum constant. |
Definition at line 66 of file NSAPI.h.
Referenced by rewriteToStringBoxedExpression().
bool clang::NSAPI::isNSNumberLiteralSelector | ( | NSNumberLiteralMethodKind | MK, |
Selector | Sel | ||
) | const [inline] |
Definition at line 167 of file NSAPI.h.
References getNSNumberLiteralSelector().
Referenced by getNSNumberLiteralMethodKind(), rewriteToBoolLiteral(), and rewriteToCharLiteral().
bool clang::NSAPI::isNSUTF8StringEncodingConstant | ( | const Expr * | E | ) | const [inline] |
Returns true if the expression.
E | is a reference of "NSUTF8StringEncoding" enum constant. |
Definition at line 60 of file NSAPI.h.
Referenced by rewriteToStringBoxedExpression().
bool NSAPI::isObjCBOOLType | ( | QualType | T | ) | const |
Returns true if.
T | is a typedef of "BOOL" in objective-c. |
Definition at line 375 of file NSAPI.cpp.
Referenced by getNSNumberFactoryMethodKind().
bool NSAPI::isObjCNSIntegerType | ( | QualType | T | ) | const |
Returns true if.
T | is a typedef of "NSInteger" in objective-c. |
Definition at line 379 of file NSAPI.cpp.
Referenced by getNSNumberFactoryMethodKind().
bool NSAPI::isObjCNSUIntegerType | ( | QualType | T | ) | const |
Returns true if.
T | is a typedef of "NSUInteger" in objective-c. |
Definition at line 383 of file NSAPI.cpp.
Referenced by getNSNumberFactoryMethodKind().
const unsigned clang::NSAPI::NumClassIds = 7 [static] |
Definition at line 38 of file NSAPI.h.
Referenced by getNSClassId().
const unsigned clang::NSAPI::NumNSArrayMethods = 9 [static] |
Definition at line 82 of file NSAPI.h.
Referenced by getNSArrayMethodKind().
const unsigned clang::NSAPI::NumNSDictionaryMethods = 12 [static] |
Definition at line 104 of file NSAPI.h.
Referenced by getNSDictionaryMethodKind().
const unsigned clang::NSAPI::NumNSNumberLiteralMethods = 15 [static] |
Definition at line 159 of file NSAPI.h.
Referenced by getNSNumberLiteralMethodKind(), getNSNumberLiteralSelector(), and clang::Sema::Sema().
const unsigned clang::NSAPI::NumNSStringMethods = 5 [static] |
Definition at line 48 of file NSAPI.h.
Referenced by getNSStringMethodKind().