Skip to content

Commit

Permalink
Moved #import statemens to declaration files and changed them to @Class
Browse files Browse the repository at this point in the history
… directives in headers instead.

To make common data classes including all their dependent objects handling easier, I added imports of all data objects to GBDataObjects.h, so it's a simple one line #import in client code to get access to all objects.
  • Loading branch information
tomaz committed Jul 28, 2010
1 parent a0536a2 commit 1d947fb
Show file tree
Hide file tree
Showing 31 changed files with 68 additions and 23 deletions.
5 changes: 3 additions & 2 deletions Model/GBCategoryData.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
//

#import "GBModelBase.h"
#import "GBAdoptedProtocolsProvider.h"
#import "GBMethodsProvider.h"

@class GBAdoptedProtocolsProvider;
@class GBMethodsProvider;

/** Describes a category.
*/
Expand Down
1 change: 1 addition & 0 deletions Model/GBCategoryData.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBDataObjects.h"
#import "GBCategoryData.h"

@implementation GBCategoryData
Expand Down
7 changes: 4 additions & 3 deletions Model/GBClassData.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
//

#import "GBModelBase.h"
#import "GBAdoptedProtocolsProvider.h"
#import "GBIvarsProvider.h"
#import "GBMethodsProvider.h"

@class GBAdoptedProtocolsProvider;
@class GBIvarsProvider;
@class GBMethodsProvider;

/** Describes a class.
*/
Expand Down
1 change: 1 addition & 0 deletions Model/GBClassData.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBDataObjects.h"
#import "GBClassData.h"

@implementation GBClassData
Expand Down
17 changes: 17 additions & 0 deletions Model/GBDataObjects.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// GBDataObjects.h
// appledoc
//
// Created by Tomaz Kragelj on 28.7.10.
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBClassData.h"
#import "GBCategoryData.h"
#import "GBProtocolData.h"
#import "GBIvarData.h"
#import "GBMethodData.h"
#import "GBMethodArgument.h"
#import "GBAdoptedProtocolsProvider.h"
#import "GBIvarsProvider.h"
#import "GBMethodsProvider.h"
4 changes: 3 additions & 1 deletion Model/GBIvarsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBIvarData.h"
#import <Foundation/Foundation.h>

@class GBIvarData;

/** A helper class that unifies ivars handling.
Expand Down
1 change: 1 addition & 0 deletions Model/GBIvarsProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBIvarData.h"
#import "GBIvarsProvider.h"

@implementation GBIvarsProvider
Expand Down
4 changes: 3 additions & 1 deletion Model/GBMethodData.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//

#import "GBModelBase.h"
#import "GBMethodArgument.h"

@class GBMethodArgument;


/** Defines different method types. */
enum {
Expand Down
1 change: 1 addition & 0 deletions Model/GBMethodData.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBMethodArgument.h"
#import "GBMethodData.h"

@interface GBMethodData ()
Expand Down
4 changes: 3 additions & 1 deletion Model/GBMethodsProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBMethodData.h"
#import <Foundation/Foundation.h>

@class GBMethodData;

/** A helper class that unifies methods handling.
Expand Down
1 change: 1 addition & 0 deletions Model/GBMethodsProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBMethodData.h"
#import "GBMethodsProvider.h"

@implementation GBMethodsProvider
Expand Down
5 changes: 3 additions & 2 deletions Model/GBProtocolData.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
//

#import "GBModelBase.h"
#import "GBAdoptedProtocolsProvider.h"
#import "GBMethodsProvider.h"

@class GBAdoptedProtocolsProvider;
@class GBMethodsProvider;

/** Describes a protocol. */
@interface GBProtocolData : GBModelBase {
Expand Down
1 change: 1 addition & 0 deletions Model/GBProtocolData.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBDataObjects.h"
#import "GBProtocolData.h"

@implementation GBProtocolData
Expand Down
1 change: 1 addition & 0 deletions Model/GBStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBDataObjects.h"
#import "GBStore.h"

@implementation GBStore
Expand Down
8 changes: 5 additions & 3 deletions Model/GBStoreProviding.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
// Copyright 2010 Gentle Bytes. All rights reserved.
//

#import "GBClassData.h"
#import "GBCategoryData.h"
#import "GBProtocolData.h"
#import <Foundation/Foundation.h>

@class GBClassData;
@class GBCategoryData;
@class GBProtocolData;

/** Defines the requirements for store providers.
Expand Down
1 change: 1 addition & 0 deletions Parsing/GBObjectiveCParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "GBTokenizer.h"
#import "GBApplicationSettingsProviding.h"
#import "GBStoreProviding.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

@interface GBObjectiveCParser ()
Expand Down
3 changes: 1 addition & 2 deletions Testing/GBCategoryDataTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Copyright (C) 2010 Gentle Bytes. All rights reserved.
//

#import "GBProtocolData.h"
#import "GBCategoryData.h"
#import "GBDataObjects.h"

@interface GBCategoryDataTesting : SenTestCase
@end
Expand Down
3 changes: 1 addition & 2 deletions Testing/GBClassDataTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Copyright (C) 2010 Gentle Bytes. All rights reserved.
//

#import "GBProtocolData.h"
#import "GBClassData.h"
#import "GBDataObjects.h"

@interface GBClassDataTesting : SenTestCase
@end
Expand Down
2 changes: 1 addition & 1 deletion Testing/GBMethodDataTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "GBTestObjectsRegistry.h"
#import "GBMethodData.h"
#import "GBDataObjects.h"

@interface GBMethodDataTesting : SenTestCase
@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBStore.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

// Note that we use class for invoking parsing of adopted protocols. Probably not the best option - i.e. we could isolate
Expand Down
1 change: 1 addition & 0 deletions Testing/GBObjectiveCParser-CategoryParsingTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBStore.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

// Note that we're only testing category specific stuff here - i.e. all common parsing modules (adopted protocols,
Expand Down
1 change: 1 addition & 0 deletions Testing/GBObjectiveCParser-ClassParsingTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBStore.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

// Note that we're only testing class specific stuff here - i.e. all common parsing modules (adopted protocols,
Expand Down
1 change: 1 addition & 0 deletions Testing/GBObjectiveCParser-IvarsParsingTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBStore.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

// Note that we use class for invoking parsing of ivars. Probably not the best option - i.e. we could isolate ivars
Expand Down
1 change: 1 addition & 0 deletions Testing/GBObjectiveCParser-MethodsParsingTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBStore.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

// Note that we use class for invoking parsing of methods. Probably not the best option - i.e. we could isolate method
Expand Down
1 change: 1 addition & 0 deletions Testing/GBObjectiveCParser-ProtocolParsingTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBStore.h"
#import "GBDataObjects.h"
#import "GBObjectiveCParser.h"

// Note that we're only testing protocol specific stuff here - i.e. all common parsing modules (adopted protocols,
Expand Down
6 changes: 4 additions & 2 deletions Testing/GBObjectsAssertor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBIvarData.h"
#import "GBMethodData.h"
#import <Foundation/Foundation.h>

@class GBIvarData;
@class GBMethodData;

// Need to derive from SenTestCase otherwise ST macros used wouldn't work...
@interface GBObjectsAssertor : SenTestCase
Expand Down
1 change: 1 addition & 0 deletions Testing/GBObjectsAssertor.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright (C) 2010, Gentle Bytes. All rights reserved.
//

#import "GBDataObjects.h"
#import "GBObjectsAssertor.h"

@implementation GBObjectsAssertor
Expand Down
2 changes: 1 addition & 1 deletion Testing/GBProtocolDataTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright (C) 2010 Gentle Bytes. All rights reserved.
//

#import "GBProtocolData.h"
#import "GBDataObjects.h"

@interface GBProtocolDataTesting : SenTestCase
@end
Expand Down
2 changes: 1 addition & 1 deletion Testing/GBStoreTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "GBStore.h"
#import "GBClassData.h"
#import "GBDataObjects.h"

@interface GBStoreTesting : SenTestCase
@end
Expand Down
2 changes: 1 addition & 1 deletion Testing/GBTestObjectsRegistry.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "GBApplicationSettingsProviding.h"
#import "GBDataObjects.h"
#import "GBTestObjectsRegistry.h"

@implementation GBTestObjectsRegistry
Expand Down Expand Up @@ -78,7 +79,6 @@ + (GBMethodData *)classMethodWithNames:(NSString *)first,... {
return [GBMethodData methodDataWithType:GBMethodTypeClass result:[NSArray arrayWithObject:@"void"] arguments:arguments];
}


+ (GBMethodData *)propertyMethodWithArgument:(NSString *)name {
GBMethodArgument *argument = [GBMethodArgument methodArgumentWithName:name];
return [GBMethodData methodDataWithType:GBMethodTypeProperty result:[NSArray arrayWithObject:@"int"] arguments:[NSArray arrayWithObject:argument]];
Expand Down
2 changes: 2 additions & 0 deletions appledoc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
7367BB3512003CAB005ED6CD /* GBModelBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBModelBase.m; sourceTree = "<group>"; };
7367BB5112004058005ED6CD /* GBModelBaseTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBModelBaseTesting.m; sourceTree = "<group>"; };
7367BBB612004928005ED6CD /* GBCategoryDataTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBCategoryDataTesting.m; sourceTree = "<group>"; };
7367BC4212005888005ED6CD /* GBDataObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBDataObjects.h; sourceTree = "<group>"; };
73D54C6111F8CE6D00CCDDB0 /* appledoc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = appledoc.m; sourceTree = "<group>"; };
73D54C6911F8CEEF00CCDDB0 /* appledoc_prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = appledoc_prefix.pch; sourceTree = "<group>"; };
73D54C9811F8D22B00CCDDB0 /* DDConsoleLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDConsoleLogger.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -434,6 +435,7 @@
isa = PBXGroup;
children = (
73FC6DE311FCD09400AAD0B9 /* GBStoreProviding.h */,
7367BC4212005888005ED6CD /* GBDataObjects.h */,
73FC6E0D11FCD54400AAD0B9 /* GBStore.h */,
73FC6E0E11FCD54400AAD0B9 /* GBStore.m */,
73FC6E8511FCD93A00AAD0B9 /* GBClassData.h */,
Expand Down

0 comments on commit 1d947fb

Please sign in to comment.