/
appledoc.m
35 lines (30 loc) · 853 Bytes
/
appledoc.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#import <Foundation/Foundation.h>
#import "CommandLineParser.h"
#import "DoxygenConverter.h"
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
@try
{
// Parse command line arguments. If command line is not ok, print usage and exit.
CommandLineParser* commandLineParser = [CommandLineParser sharedInstance];
[commandLineParser parseCommandLineArguments:argv ofCount:argc];
// Create and run the converter.
DoxygenConverter* converter = [[DoxygenConverter alloc] init];
[converter convert];
[converter release];
// Release the command line parser.
[commandLineParser release];
}
@catch (NSException* e)
{
NSLog(@"Exiting due to exception: %@", e);
[[CommandLineParser sharedInstance] printUsage];
return 1;
}
@finally
{
[pool drain];
}
return 0;
}