ObjFW  Check-in [8e594ea87a]

Overview
Comment:Add OF_APPLICATION_DELEGATE macro.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8e594ea87a389adf05b2bc5734c7a93e14b5bdc9d2d572aa64ef18811b5f0570
User & Date: js on 2010-04-07 23:24:00
Other Links: manifest | tags
Context
2010-04-08
02:00
Add -[programName] to OFApplication and remove it from -[arguments]. check-in: b23b8c11bc user: js tags: trunk
2010-04-07
23:24
Add OF_APPLICATION_DELEGATE macro. check-in: 8e594ea87a user: js tags: trunk
21:14
Minor documentation fixes. check-in: d2796e2a91 user: js tags: trunk
Changes

Modified src/OFApplication.h from [b34d8ea808] to [6b59f8bebe].

9
10
11
12
13
14
15







16
17
18
19
20
21
22
 * the packaging of this file.
 */

#import "OFObject.h"

@class OFArray;
@class OFMutableArray;








/**
 * \brief A protocol for delegates of OFApplication.
 */
@protocol OFApplicationDelegate
/**
 * This method is called when the application was initialized and is running







>
>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 * the packaging of this file.
 */

#import "OFObject.h"

@class OFArray;
@class OFMutableArray;

#define OF_APPLICATION_DELEGATE(cls)					\
	int								\
	main(int argc, char *argv[])					\
	{								\
		return of_application_main(argc, argv, [cls class]);	\
	}

/**
 * \brief A protocol for delegates of OFApplication.
 */
@protocol OFApplicationDelegate
/**
 * This method is called when the application was initialized and is running

Modified tests/TestsAppDelegate.m from [cceb875b84] to [bed8806365].

11
12
13
14
15
16
17


18
19
20
21
22
23
24

#import "OFString.h"
#import "OFFile.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"



@implementation TestsAppDelegate
- (void)outputString: (OFString*)str
	   withColor: (int)color
{
#ifdef STDOUT
	switch (color) {
	case 0:







>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#import "OFString.h"
#import "OFFile.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

OF_APPLICATION_DELEGATE(TestsAppDelegate)

@implementation TestsAppDelegate
- (void)outputString: (OFString*)str
	   withColor: (int)color
{
#ifdef STDOUT
	switch (color) {
	case 0:
93
94
95
96
97
98
99
100
101
102
103
104
105
	[self pluginTests];
#endif
#ifdef OF_HAVE_PROPERTIES
	[self propertiesTests];
#endif
}
@end

int
main(int argc, char *argv[])
{
	return of_application_main(argc, argv, [TestsAppDelegate class]);
}







<
<
<
<
<
<
95
96
97
98
99
100
101






	[self pluginTests];
#endif
#ifdef OF_HAVE_PROPERTIES
	[self propertiesTests];
#endif
}
@end