ObjFW  Diff

Differences From Artifact [6b59f8bebe]:

To Artifact [24c74a3550]:


1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFObject.h"


@class OFArray;
@class OFMutableArray;

#define OF_APPLICATION_DELEGATE(cls)					\
	int								\
	main(int argc, char *argv[])					\
	{								\













>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFObject.h"

@class OFString;
@class OFArray;
@class OFMutableArray;

#define OF_APPLICATION_DELEGATE(cls)					\
	int								\
	main(int argc, char *argv[])					\
	{								\
38
39
40
41
42
43
44

45
46
47
48
49
50
51
52
53





54
55
56
57
58
59
60
@end

/**
 * \brief Represents the application as an object.
 */
@interface OFApplication: OFObject
{

	OFMutableArray *arguments;
	id delegate;
}

/**
 * \return The only OFApplication instance in the application
 */
+ sharedApplication;






/**
 * \return The arguments passed to the application
 */
+ (OFArray*)arguments;

/**
 * Terminates the application.







>









>
>
>
>
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@end

/**
 * \brief Represents the application as an object.
 */
@interface OFApplication: OFObject
{
	OFString *progname;
	OFMutableArray *arguments;
	id delegate;
}

/**
 * \return The only OFApplication instance in the application
 */
+ sharedApplication;

/**
 * \return The name of the program (argv[0])
 */
+ (OFString*)programName;

/**
 * \return The arguments passed to the application
 */
+ (OFArray*)arguments;

/**
 * Terminates the application.
68
69
70
71
72
73
74





75
76
77
78
79
80
81
 *
 * \param argc The number of arguments
 * \param argv The argument values
 */
-  setArgumentCount: (int)argc
  andArgumentValues: (char**)argv;






/**
 * \return The arguments passed to the application
 */
- (OFArray*)arguments;

/**
 * \return The delegate of the application







>
>
>
>
>







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 *
 * \param argc The number of arguments
 * \param argv The argument values
 */
-  setArgumentCount: (int)argc
  andArgumentValues: (char**)argv;

/**
 * \return The name of the program (argv[0])
 */
- (OFString*)programName;

/**
 * \return The arguments passed to the application
 */
- (OFArray*)arguments;

/**
 * \return The delegate of the application