diff options
Diffstat (limited to 'include/clang/AST/DeclObjC.h')
-rw-r--r-- | include/clang/AST/DeclObjC.h | 109 |
1 files changed, 55 insertions, 54 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 93441d2e83..88b7b773a1 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -136,7 +136,7 @@ private: mutable unsigned HasRedeclaration : 1; // NOTE: VC++ treats enums as signed, avoid using ImplementationControl enum - /// @required/@optional + /// \@required/\@optional unsigned DeclImplementation : 2; // NOTE: VC++ treats enums as signed, avoid using the ObjCDeclQualifier enum @@ -415,7 +415,7 @@ public: bool isOverriding() const { return IsOverriding; } void setOverriding(bool isOverriding) { IsOverriding = isOverriding; } - // Related to protocols declared in @protocol + // Related to protocols declared in \@protocol void setDeclImplementation(ImplementationControl ic) { DeclImplementation = ic; } @@ -550,21 +550,21 @@ public: /// ObjCInterfaceDecl - Represents an ObjC class declaration. For example: /// /// // MostPrimitive declares no super class (not particularly useful). -/// @interface MostPrimitive +/// \@interface MostPrimitive /// // no instance variables or methods. -/// @end +/// \@end /// /// // NSResponder inherits from NSObject & implements NSCoding (a protocol). -/// @interface NSResponder : NSObject <NSCoding> +/// \@interface NSResponder : NSObject <NSCoding> /// { // instance variables are represented by ObjCIvarDecl. /// id nextResponder; // nextResponder instance variable. /// } /// - (NSResponder *)nextResponder; // return a pointer to NSResponder. /// - (void)mouseMoved:(NSEvent *)theEvent; // return void, takes a pointer -/// @end // to an NSEvent. +/// \@end // to an NSEvent. /// -/// Unlike C/C++, forward class declarations are accomplished with @class. -/// Unlike C/C++, @class allows for a list of classes to be forward declared. +/// Unlike C/C++, forward class declarations are accomplished with \@class. +/// Unlike C/C++, \@class allows for a list of classes to be forward declared. /// Unlike C++, ObjC is a single-rooted class model. In Cocoa, classes /// typically inherit from NSObject (an exception is NSProxy). /// @@ -585,10 +585,10 @@ class ObjCInterfaceDecl : public ObjCContainerDecl /// Class's super class. ObjCInterfaceDecl *SuperClass; - /// Protocols referenced in the @interface declaration + /// Protocols referenced in the \@interface declaration ObjCProtocolList ReferencedProtocols; - /// Protocols reference in both the @interface and class extensions. + /// Protocols reference in both the \@interface and class extensions. ObjCList<ObjCProtocolDecl> AllReferencedProtocols; /// \brief List of categories and class extensions defined for this class. @@ -818,21 +818,21 @@ public: bool hasDefinition() const { return Data; } /// \brief Retrieve the definition of this class, or NULL if this class - /// has been forward-declared (with @class) but not yet defined (with - /// @interface). + /// has been forward-declared (with \@class) but not yet defined (with + /// \@interface). ObjCInterfaceDecl *getDefinition() { return hasDefinition()? Data->Definition : 0; } /// \brief Retrieve the definition of this class, or NULL if this class - /// has been forward-declared (with @class) but not yet defined (with - /// @interface). + /// has been forward-declared (with \@class) but not yet defined (with + /// \@interface). const ObjCInterfaceDecl *getDefinition() const { return hasDefinition()? Data->Definition : 0; } /// \brief Starts the definition of this Objective-C class, taking it from - /// a forward declaration (@class) to a definition (@interface). + /// a forward declaration (\@class) to a definition (\@interface). void startDefinition(); ObjCInterfaceDecl *getSuperClass() const { @@ -898,8 +898,8 @@ public: } /// isObjCRequiresPropertyDefs - Checks that a class or one of its super - /// classes must not be auto-synthesized. Returns class decl. if it must not be; - /// 0, otherwise. + /// classes must not be auto-synthesized. Returns class decl. if it must not + /// be; 0, otherwise. const ObjCInterfaceDecl *isObjCRequiresPropertyDefs() const { const ObjCInterfaceDecl *Class = this; while (Class) { @@ -947,8 +947,8 @@ public: SourceLocation getSuperClassLoc() const { return data().SuperClassLoc; } /// isImplicitInterfaceDecl - check that this is an implicitly declared - /// ObjCInterfaceDecl node. This is for legacy objective-c @implementation - /// declaration without an @interface declaration. + /// ObjCInterfaceDecl node. This is for legacy objective-c \@implementation + /// declaration without an \@interface declaration. bool isImplicitInterfaceDecl() const { return hasDefinition() ? Data->Definition->isImplicit() : isImplicit(); } @@ -991,14 +991,14 @@ public: /// instance variables are identical to C. The only exception is Objective-C /// supports C++ style access control. For example: /// -/// @interface IvarExample : NSObject +/// \@interface IvarExample : NSObject /// { /// id defaultToProtected; -/// @public: +/// \@public: /// id canBePublic; // same as C++. -/// @protected: +/// \@protected: /// id canBeProtected; // same as C++. -/// @package: +/// \@package: /// id canBePackage; // framework visibility (not available in C++). /// } /// @@ -1066,7 +1066,7 @@ private: /// ObjCAtDefsFieldDecl - Represents a field declaration created by an -/// @defs(...). +/// \@defs(...). class ObjCAtDefsFieldDecl : public FieldDecl { virtual void anchor(); ObjCAtDefsFieldDecl(DeclContext *DC, SourceLocation StartLoc, @@ -1095,17 +1095,17 @@ public: /// Protocols originally drew inspiration from C++ pure virtual functions (a C++ /// feature with nice semantics and lousy syntax:-). Here is an example: /// -/// @protocol NSDraggingInfo <refproto1, refproto2> +/// \@protocol NSDraggingInfo <refproto1, refproto2> /// - (NSWindow *)draggingDestinationWindow; /// - (NSImage *)draggedImage; -/// @end +/// \@end /// /// This says that NSDraggingInfo requires two methods and requires everything /// that the two "referenced protocols" 'refproto1' and 'refproto2' require as /// well. /// -/// @interface ImplementsNSDraggingInfo : NSObject <NSDraggingInfo> -/// @end +/// \@interface ImplementsNSDraggingInfo : NSObject <NSDraggingInfo> +/// \@end /// /// ObjC protocols inspired Java interfaces. Unlike Java, ObjC classes and /// protocols are in distinct namespaces. For example, Cocoa defines both @@ -1274,9 +1274,9 @@ public: /// you to add instance data. The following example adds "myMethod" to all /// NSView's within a process: /// -/// @interface NSView (MyViewMethods) +/// \@interface NSView (MyViewMethods) /// - myMethod; -/// @end +/// \@end /// /// Categories also allow you to split the implementation of a class across /// several files (a feature more naturally supported in C++). @@ -1450,16 +1450,16 @@ public: }; /// ObjCCategoryImplDecl - An object of this class encapsulates a category -/// @implementation declaration. If a category class has declaration of a +/// \@implementation declaration. If a category class has declaration of a /// property, its implementation must be specified in the category's -/// @implementation declaration. Example: -/// @interface I @end -/// @interface I(CATEGORY) -/// @property int p1, d1; -/// @end -/// @implementation I(CATEGORY) -/// @dynamic p1,d1; -/// @end +/// \@implementation declaration. Example: +/// \@interface I \@end +/// \@interface I(CATEGORY) +/// \@property int p1, d1; +/// \@end +/// \@implementation I(CATEGORY) +/// \@dynamic p1,d1; +/// \@end /// /// ObjCCategoryImplDecl class ObjCCategoryImplDecl : public ObjCImplDecl { @@ -1542,9 +1542,9 @@ raw_ostream &operator<<(raw_ostream &OS, const ObjCCategoryImplDecl &CID); /// method definitions are specified. For example: /// /// @code -/// @implementation MyClass +/// \@implementation MyClass /// - (void)myMethod { /* do something */ } -/// @end +/// \@end /// @endcode /// /// Typically, instance variables are specified in the class interface, @@ -1556,7 +1556,7 @@ class ObjCImplementationDecl : public ObjCImplDecl { virtual void anchor(); /// Implementation Class's super class. ObjCInterfaceDecl *SuperClass; - /// @implementation may have private ivars. + /// \@implementation may have private ivars. SourceLocation IvarLBraceLoc; SourceLocation IvarRBraceLoc; @@ -1698,7 +1698,7 @@ public: raw_ostream &operator<<(raw_ostream &OS, const ObjCImplementationDecl &ID); /// ObjCCompatibleAliasDecl - Represents alias of a class. This alias is -/// declared as @compatibility_alias alias class. +/// declared as \@compatibility_alias alias class. class ObjCCompatibleAliasDecl : public NamedDecl { virtual void anchor(); /// Class that this is an alias of. @@ -1727,7 +1727,7 @@ public: /// ObjCPropertyDecl - Represents one property declaration in an interface. /// For example: -/// @property (assign, readwrite) int MyProperty; +/// \@property (assign, readwrite) int MyProperty; /// class ObjCPropertyDecl : public NamedDecl { virtual void anchor(); @@ -1757,12 +1757,12 @@ public: enum SetterKind { Assign, Retain, Copy, Weak }; enum PropertyControl { None, Required, Optional }; private: - SourceLocation AtLoc; // location of @property + SourceLocation AtLoc; // location of \@property SourceLocation LParenLoc; // location of '(' starting attribute list or null. TypeSourceInfo *DeclType; unsigned PropertyAttributes : NumPropertyAttrsBits; unsigned PropertyAttributesAsWritten : NumPropertyAttrsBits; - // @required/@optional + // \@required/\@optional unsigned PropertyImplementation : 2; Selector GetterName; // getter name of NULL if no getter @@ -1874,7 +1874,7 @@ public: ObjCMethodDecl *getSetterMethodDecl() const { return SetterMethodDecl; } void setSetterMethodDecl(ObjCMethodDecl *gDecl) { SetterMethodDecl = gDecl; } - // Related to @optional/@required declared in @protocol + // Related to \@optional/\@required declared in \@protocol void setPropertyImplementation(PropertyControl pc) { PropertyImplementation = pc; } @@ -1904,7 +1904,7 @@ public: /// ObjCPropertyImplDecl - Represents implementation declaration of a property /// in a class or category implementation block. For example: -/// @synthesize prop1 = ivar1; +/// \@synthesize prop1 = ivar1; /// class ObjCPropertyImplDecl : public Decl { public: @@ -1913,26 +1913,27 @@ public: Dynamic }; private: - SourceLocation AtLoc; // location of @synthesize or @dynamic + SourceLocation AtLoc; // location of \@synthesize or \@dynamic - /// \brief For @synthesize, the location of the ivar, if it was written in + /// \brief For \@synthesize, the location of the ivar, if it was written in /// the source code. /// /// \code - /// @synthesize int a = b + /// \@synthesize int a = b /// \endcode SourceLocation IvarLoc; /// Property declaration being implemented ObjCPropertyDecl *PropertyDecl; - /// Null for @dynamic. Required for @synthesize. + /// Null for \@dynamic. Required for \@synthesize. ObjCIvarDecl *PropertyIvarDecl; - /// Null for @dynamic. Non-null if property must be copy-constructed in getter + /// Null for \@dynamic. Non-null if property must be copy-constructed in + /// getter. Expr *GetterCXXConstructor; - /// Null for @dynamic. Non-null if property has assignment operator to call + /// Null for \@dynamic. Non-null if property has assignment operator to call /// in Setter synthesis. Expr *SetterCXXAssignment; |