Skip to content

Commit 681e2e8

Browse files
committed
Removed explicit instance variable declarations from all header files. Updated the coding style guide.
1 parent c3d824b commit 681e2e8

116 files changed

Lines changed: 260 additions & 709 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

documentation/Coding Style.markdown

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,18 @@ Instance variables should be private or protected. No special naming convention
136136
CPTFill *fill;
137137
}
138138

139+
// property and method declarations
140+
141+
@end
142+
143+
Beginning with Core Plot 2.0, the minimum deployment target requires the modern Objective-C runtime. Core Plot classes should no longer declare instance variables in the header file and should instead declare public or private properties and rely on auto-synthesized instance variables.
144+
145+
@interface CPTGraph : CPTLayer
146+
147+
// property and method declarations
148+
149+
@end
150+
139151
Methods
140152
-------
141153
Methods are declared in a class header only if they have not already been declared in an ancestor class (e.g., `super`) or protocol. Methods such as `init` and `dealloc` thus need not be re-declared.

framework/CorePlot-CocoaTouch.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,7 @@
12641264
OTHER_CFLAGS = (
12651265
"-Wextra",
12661266
"-Wno-unused-parameter",
1267+
"-Wobjc-interface-ivars",
12671268
);
12681269
OTHER_LDFLAGS = (
12691270
"-all_load",
@@ -1316,6 +1317,7 @@
13161317
OTHER_CFLAGS = (
13171318
"-Wextra",
13181319
"-Wno-unused-parameter",
1320+
"-Wobjc-interface-ivars",
13191321
);
13201322
OTHER_LDFLAGS = (
13211323
"-all_load",

framework/CorePlot.xcodeproj/project.pbxproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
C3C2847416585085006BA43C /* _CPTAnimationTimingFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _CPTAnimationTimingFunctions.m; sourceTree = "<group>"; };
460460
C3C9CB0C165DB4D500739006 /* CPTAnimationOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPTAnimationOperation.h; sourceTree = "<group>"; };
461461
C3C9CB0D165DB4D500739006 /* CPTAnimationOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPTAnimationOperation.m; sourceTree = "<group>"; };
462-
C3C9CB11165DB50300739006 /* CPTAnimationPeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CPTAnimationPeriod.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
462+
C3C9CB11165DB50300739006 /* CPTAnimationPeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CPTAnimationPeriod.h; sourceTree = "<group>"; };
463463
C3C9CB12165DB50300739006 /* CPTAnimationPeriod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CPTAnimationPeriod.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
464464
C3C9CB15165DB52C00739006 /* _CPTAnimationCGFloatPeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _CPTAnimationCGFloatPeriod.h; sourceTree = "<group>"; };
465465
C3C9CB16165DB52C00739006 /* _CPTAnimationCGFloatPeriod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _CPTAnimationCGFloatPeriod.m; sourceTree = "<group>"; };
@@ -1624,6 +1624,11 @@
16241624
INSTALL_PATH = "@loader_path/../Frameworks";
16251625
MACOSX_DEPLOYMENT_TARGET = 10.6.8;
16261626
ONLY_ACTIVE_ARCH = YES;
1627+
OTHER_CFLAGS = (
1628+
"-Wextra",
1629+
"-Wno-unused-parameter",
1630+
"-Wobjc-interface-ivars",
1631+
);
16271632
PRODUCT_NAME = CorePlot;
16281633
WRAPPER_EXTENSION = framework;
16291634
};
@@ -1649,6 +1654,11 @@
16491654
INFOPLIST_FILE = Info.plist;
16501655
INSTALL_PATH = "@loader_path/../Frameworks";
16511656
MACOSX_DEPLOYMENT_TARGET = 10.6.8;
1657+
OTHER_CFLAGS = (
1658+
"-Wextra",
1659+
"-Wno-unused-parameter",
1660+
"-Wobjc-interface-ivars",
1661+
);
16521662
PRODUCT_NAME = CorePlot;
16531663
"VALID_ARCHS[sdk=*]" = "i386 x86_64";
16541664
WRAPPER_EXTENSION = framework;
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@interface CPTDecimalNumberValueTransformer : NSValueTransformer {
2-
}
1+
@interface CPTDecimalNumberValueTransformer : NSValueTransformer
32

43
@end

framework/MacOnly/CPTGraphHostingView.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
@class CPTGraph;
44

5-
@interface CPTGraphHostingView : NSView {
6-
@private
7-
CPTGraph *hostedGraph;
8-
NSRect printRect;
9-
}
5+
@interface CPTGraphHostingView : NSView
106

117
@property (nonatomic, readwrite, strong) CPTGraph *hostedGraph;
128
@property (nonatomic, readwrite, assign) NSRect printRect;

framework/Source/CPTAnimation.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,6 @@ CPTAnimationCurve;
8282
#pragma mark -
8383

8484
@interface CPTAnimation : NSObject
85-
{
86-
@private
87-
NSMutableArray *animationOperations;
88-
NSMutableArray *runningAnimationOperations;
89-
NSMutableArray *expiredAnimationOperations;
90-
NSTimer *timer;
91-
92-
CGFloat timeOffset;
93-
CPTAnimationCurve defaultAnimationCurve;
94-
}
9585

9686
/// @name Time
9787
/// @{

framework/Source/CPTAnimationOperation.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@
33

44
@class CPTAnimationPeriod;
55

6-
@interface CPTAnimationOperation : NSObject {
7-
@private
8-
CPTAnimationPeriod *period;
9-
CPTAnimationCurve animationCurve;
10-
11-
id boundObject;
12-
SEL boundGetter;
13-
SEL boundSetter;
14-
15-
__cpt_weak NSObject<CPTAnimationDelegate> *delegate;
16-
}
6+
@interface CPTAnimationOperation : NSObject
177

188
/// @name Animation Timing
199
/// @{

framework/Source/CPTAnimationPeriod.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
@class CPTAnimationOperation;
44
@class CPTPlotRange;
55

6-
@interface CPTAnimationPeriod : NSObject {
7-
@private
8-
NSValue *startValue;
9-
NSValue *endValue;
10-
CGFloat duration;
11-
CGFloat delay;
12-
CGFloat startOffset;
13-
}
6+
@interface CPTAnimationPeriod : NSObject
147

158
/// @name Timing Values
169
/// @{

framework/Source/CPTAnnotation.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
@class CPTAnnotationHostLayer;
44
@class CPTLayer;
55

6-
@interface CPTAnnotation : NSObject<NSCoding> {
7-
@private
8-
__cpt_weak CPTAnnotationHostLayer *annotationHostLayer;
9-
CPTLayer *contentLayer;
10-
CGPoint contentAnchorPoint;
11-
CGPoint displacement;
12-
CGFloat rotation;
13-
}
6+
@interface CPTAnnotation : NSObject<NSCoding>
147

158
@property (nonatomic, readwrite, strong) CPTLayer *contentLayer;
169
@property (nonatomic, readwrite, cpt_weak_property) __cpt_weak CPTAnnotationHostLayer *annotationHostLayer;

framework/Source/CPTAnnotationHostLayer.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
@class CPTAnnotation;
44

5-
@interface CPTAnnotationHostLayer : CPTLayer {
6-
@private
7-
NSMutableArray *mutableAnnotations;
8-
}
5+
@interface CPTAnnotationHostLayer : CPTLayer
96

107
@property (nonatomic, readonly, strong) NSArray *annotations;
118

0 commit comments

Comments
 (0)