Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleaned up all of the 1.0 project files for fresh start.

As 2.0 is a major update, starting with fresh project makes sense; old code can simply be copied over from the master branch anyway.
  • Loading branch information...
commit e466519e86ac7b3fbcf30267533b90631e241894 1 parent da6841b
@tomaz authored
Showing with 37 additions and 14,991 deletions.
  1. +0 −276 CommandLineParser.h
  2. +0 −1,043 CommandLineParser.m
  3. +0 −44 Constants.h
  4. +0 −60 Constants.m
  5. +0 −12 DocSet-Info.plist
  6. +0 −150 DocSetOutputGenerator.h
  7. +0 −475 DocSetOutputGenerator.m
  8. +0 −1,510 Doxyfile
  9. +0 −134 DoxygenConverter.h
  10. +0 −123 DoxygenConverter.m
  11. +0 −84 DoxygenOutputGenerator.h
  12. +0 −274 DoxygenOutputGenerator.m
  13. +0 −217 LoggingProvider.h
  14. +0 −134 LoggingProvider.m
  15. +0 −319 MarkdownOutputGenerator.h
  16. +0 −1,114 MarkdownOutputGenerator.m
  17. +0 −30 NSObject+Logging.h
  18. +0 −22 NSObject+Logging.m
  19. +0 −201 OutputGenerator.h
  20. +0 −188 OutputGenerator.m
  21. +0 −102 OutputInfoProvider.h
  22. +0 −46 OutputProcessing.h
  23. +0 −640 Readme.markdown
  24. +0 −200 Systemator.h
  25. +0 −461 Systemator.m
  26. +0 −354 Templates/object.xslt
  27. +0 −299 Templates/screen.css
  28. +0 −207 XHTMLOutputGenerator.h
  29. +0 −944 XHTMLOutputGenerator.m
  30. +0 −275 XMLBasedOutputGenerator+GeneralParsingAPI.h
  31. +0 −194 XMLBasedOutputGenerator+GeneralParsingAPI.m
  32. +0 −50 XMLBasedOutputGenerator+HierarchyParsingAPI.h
  33. +0 −43 XMLBasedOutputGenerator+HierarchyParsingAPI.m
  34. +0 −139 XMLBasedOutputGenerator+HierarchySubclassAPI.h
  35. +0 −91 XMLBasedOutputGenerator+HierarchySubclassAPI.m
  36. +0 −39 XMLBasedOutputGenerator+IndexParsingAPI.h
  37. +0 −33 XMLBasedOutputGenerator+IndexParsingAPI.m
  38. +0 −134 XMLBasedOutputGenerator+IndexSubclassAPI.h
  39. +0 −71 XMLBasedOutputGenerator+IndexSubclassAPI.m
  40. +0 −363 XMLBasedOutputGenerator+ObjectParsingAPI.h
  41. +0 −201 XMLBasedOutputGenerator+ObjectParsingAPI.m
  42. +0 −373 XMLBasedOutputGenerator+ObjectSubclassAPI.h
  43. +0 −176 XMLBasedOutputGenerator+ObjectSubclassAPI.m
  44. +0 −248 XMLBasedOutputGenerator.h
  45. +0 −639 XMLBasedOutputGenerator.m
  46. +0 −406 XMLOutputGenerator.h
  47. +0 −1,472 XMLOutputGenerator.m
  48. +9 −33 appledoc.m
  49. +22 −346 appledoc.xcodeproj/project.pbxproj
  50. +6 −2 appledoc_Prefix.pch
View
276 CommandLineParser.h
@@ -1,276 +0,0 @@
-//
-// CommandLineParser.h
-// appledoc
-//
-// Created by Tomaz Kragelj on 12.4.09.
-// Copyright 2009 Tomaz Kragelj. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-#define kTKVerboseLevelError 0
-#define kTKVerboseLevelNormal 1
-#define kTKVerboseLevelInfo 2
-#define kTKVerboseLevelVerbose 3
-#define kTKVerboseLevelDebug 4
-#define kTKVerboseLevelFull 5
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////
-/** This class parses the utility command line arguments and provides the values.
-
-Since the class already knows how to interpret command line arguments, including verbose
-levels, which are used throughout the whole application objects, the class is implemented
-as a singleton.
-*/
-@interface CommandLineParser : NSObject
-{
- NSMutableArray* commandLineArguments;
- NSMutableDictionary* parameters;
- NSString* outputDoxygenXMLPath;
- NSString* globalTemplatesPath;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Initialization & disposal
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Returns the shared instance of the class which can be used throughout the application.
-
-To make the class as accessible for the rest of the application, it is implemented as a
-singleton through @c sharedInstance(). Although nothing will prevent clients creating
-additional instances, it is reccommended to use the singleton interface to prevent
-possible problems.
-*/
-+ (CommandLineParser*) sharedInstance;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Parsing handling
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Parses the given command line arguments and set ups the object values.
-
-This message must be sent to the class after construction before all the properties
-can be used. It will parse and validate the given arguments. If any inconsistency is
-detected, an exception will be thrown. After parsing all command line arguments, the
-method checks if all required data is provided and returns @c YES if so. If not, it
-returns @c NO which indicates that the user doesn't know how to use the utility and
-@c printUsage() should probably be called.
-
-Note that parsing code may be called as many times as needed. Eact time, the properties
-are reset and then the given command line parsed.
-
-@param argv The array of zero terminated c strings.
-@param argc The number of items in the @c argv array.
-@exception NSException Thrown if parsing fails.
-@see printUsage
-*/
-- (void) parseCommandLineArguments:(const char**) argv
- ofCount:(int) argc;
-
-/** Outputs the utility usage to the standard output.
-
-@see parseCommandLineArguments:ofCount:
-*/
-- (void) printUsage;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - required
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** The command line path to the executable including full path. */
-@property(readonly) NSString* commandLine;
-
-/** Project name. */
-@property(readonly) NSString* projectName;
-
-/** The path to the source files. */
-@property(readonly) NSString* inputPath;
-
-/** The path to the output files (sub directories are created within this location). */
-@property(readonly) NSString* outputPath;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - doxygen
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** The command line to the doxygen utility including full path. */
-@property(readonly) NSString* doxygenCommandLine;
-
-/** The path to the doxygen configuration file including full path. */
-@property(readonly) NSString* doxygenConfigFilename;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - clean XML creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** If @c YES, class locations are fixed if (possibly) invalid location is detected. */
-@property(readonly) BOOL fixClassLocations;
-
-/** If @c YES, empty paragraphs should be removed from clean XML. */
-@property(readonly) BOOL removeEmptyParagraphs;
-
-/** If @c YES, documentation for categories to known classes should be merged to the
-class documentation. */
-@property(readonly) BOOL mergeKnownCategoriesToClasses;
-
-/** If @c YES, merged categories method sections should be preserved in the class.
-
-@warning This option can create cluttered class documentation, so experiment to see if
- if works for you or not. */
-@property(readonly) BOOL keepMergedCategorySections;
-
-/** The template for creating references to members of another objects.
-
-This is used to generate the actual reference name and is visible on the final output. */
-@property(readonly) NSString* objectReferenceTemplate;
-
-/** The template for creating references to members of the same object.
-
-This is used to generate the actual reference name and is visible on the final output. */
-@property(readonly) NSString* memberReferenceTemplate;
-
-/** The template for formatting date/time strings. */
-@property(readonly) NSString* dateTimeTemplate;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - clean output creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** If @c YES, clean XHTML documentation is created. */
-@property(readonly) BOOL createCleanXHTML;
-
-/** If @c YES, documentation set is created.
-
-Note That @c createCleanXHTML() is a prerequisite for documentation set. */
-@property(readonly) BOOL createDocSet;
-
-/** If @c YES, Markdown documentaiton is created. */
-@property(readonly) BOOL createMarkdown;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - XHTML output creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** If @c YES, use bordered XHTML example sections which results in more Apple like
-documentation. */
-@property(readonly) BOOL xhtmlUseBorderedExamples;
-
-/** If @c YES, use bordered XHTML warning sections which results in more Apple like
-documentation. */
-@property(readonly) BOOL xhtmlUseBorderedWarnings;
-
-/** If @c YES, use bordered XHTML bug sections which results in more Apple like
-documentation. */
-@property(readonly) BOOL xhtmlUseBorderedBugs;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - documentation set creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** The documentation set unique bundle ID. */
-@property(assign) NSString* docsetBundleID;
-
-/** The documentation set bundle feed which is displayed in the Xcode documentation window. */
-@property(assign) NSString* docsetBundleFeed;
-
-/** The documentation set source plist which contains identification and description. */
-@property(readonly) NSString* docsetSourcePlistPath;
-
-/** The @c docsetutil command line including full path. */
-@property(readonly) NSString* docsetutilCommandLine;
-
-/** The documentation set installation path.
-
-This should be set to one of the known locations which Xcode searches. By default it is
-set to user's documentation set directory. */
-@property(readonly) NSString* docsetInstallPath;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - Markdown creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** If @c YES, object files links are created using reference style, otherwise inline
-links are created. */
-@property(readonly) BOOL markdownReferenceStyleLinks;
-
-/** The maximum number of chars to use in one line.
-
-This is the desired maximum line length.
-*/
-@property(readonly) int markdownLineLength;
-
-/** The minimum number of chars in the line before considering wrapping.
-
-This value controls line wrapping when adding non-wrappable phrases. It works in
-pair with @c markdownLineLength() and @c markdownLineWrapMargin().
-
-If the line has less chars than this value, a non-wrappable phrase is still appended if
-the total line length including the phrase is below the sum of @c markdownLineLength() and
-@c markdownLineWrapMargin().
-
-@see markdownLineLength
-*/
-@property(readonly) int markdownLineWrapThreshold;
-
-/** The maximum number of chars to use in one line.
-
-This value controls line wrapping when adding non-wrappable phrases. It works in
-pair with @c markdownLineLength() and @c markdownLineWrapThreshold().
-
-If the line length is below or equal to the threshold, the phrase is added to it even if
-the new line length is over the @c markdownLineLength() however below the given margin.
-
-@see markdownLineLength
-*/
-@property(readonly) int markdownLineWrapMargin;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - miscellaneous
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** The path to the template files and global options.
-
-This is automatically determined by checking the known locations which are (in order of
-preference):
-- ~/.appledoc
-- ~/Application Support/appledoc */
-@property(readonly) NSString* templatesPath;
-
-/** If @c YES, temporary files are removed after generation.
-
-This will effectively remove all but the "last" generated files. Which files will be
-removed it depends on what is the desired output. If this is one of the clean outputs,
-all doxygen and clean XML files will be removed. If this is documentation set, the
-clean HTML files will be removed too (other final output files will remain if chosen). */
-@property(readonly) BOOL cleanTempFilesAfterBuild;
-
-/** If @c YES, the @c outputPath() is deleted before starting processing.
-
-This is important because otherwise deleted or renamed files will remain in the final
-documentation.
-@ warning Be careful when using this option - it will remove the @c outputPath() directory
- too, so if you keep any files which are not automatically generated there (should not
- really!), such as source files or plists etc., these will also be removed! */
-@property(readonly) BOOL cleanOutputFilesBeforeBuild;
-
-/** The desired verbose level.
-
-This is used by the log macros, so in most cases, you'll not use it directly in code. */
-@property(readonly) int verboseLevel;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties - "undocumented"
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** This is used to show or hide the output from the external utilities such as @c doxygen
-and @c docsetutil. */
-@property(readonly) BOOL emitUtilityOutput;
-
-/** Generator name and version. */
-@property(readonly) NSString* generator;
-
-/** The version of appledoc. */
-@property(readonly) NSString* version;
-
-@end
View
1,043 CommandLineParser.m
@@ -1,1043 +0,0 @@
-//
-// CommandLineParser.m
-// appledoc
-//
-// Created by Tomaz Kragelj on 12.4.09.
-// Copyright 2009 Tomaz Kragelj. All rights reserved.
-//
-
-#import "CommandLineParser.h"
-#import "LoggingProvider.h"
-#import "Systemator.h"
-
-#define kTKCommandLineException @"TKCommandLineException"
-
-#define kTKCmdGlobalTemplatesPathKey @"GlobalTemplatesPath" // NSString
-#define kTKCmdTemplatesPathKey @"TemplatesPath" // NSString
-#define kTKCmdCommandLineKey @"CommandLine" // NSString
-#define kTKCmdProjectNameKey @"ProjectName" // NSString
-
-#define kTKCmdInputPathKey @"InputPath" // NSString
-#define kTKCmdOutputPathKey @"OutputPath" // NSString
-
-#define kTKCmdDoxygenCommandLineKey @"DoxygenCommandLine" // NSString
-#define kTKCmdDoxygenConfigFileKey @"DoxygenConfigFile" // NSString
-
-#define kTKCmdCreateCleanXHTMLKey @"CreateXHTML" // NSNumber / BOOL
-#define kTKCmdCreateDocSetKey @"CreateDocSet" // NSNumber / BOOL
-#define kTKCmdCreateMarkdownKey @"CreateMarkdown" // NSNumber / BOOL
-
-#define kTKCmdXHTMLBorderedExamplesKey @"XHTMLUseBorderedExamples" // NSNumber / BOOL
-#define kTKCmdXHTMLBorderedWarningsKey @"XHTMLUseBorderedWarnings" // NSNumber / BOOL
-#define kTKCmdXHTMLBorderedBugsKey @"XHTMLUseBorderedBugs" // NSNumber / BOOL
-
-#define kTKCmdDocSetBundleIDKey @"DocSetBundleID" // NSString
-#define kTKCmdDocSetBundleFeedKey @"DocSetBundleFeed" // NSString
-#define kTKCmdDocSetSourcePlistKey @"DocSetSourcePlist" // NSString
-#define kTKCmdDocSetUtilCommandLinKey @"DocSetUtilCommandLine" // NSString
-#define kTKCmdDocSetInstallPathKey @"DocSetInstallPath" // NSString
-
-#define kTKCmdMarkdownRefStyleLinksKey @"MarkdownReferenceStyleLinks" // NSNumber / BOOL
-#define kTKCmdMarkdownLineLengthKey @"MarkdownLineLength" // NSNumber / int
-#define kTKCmdMarkdownLineThresholdKey @"MarkdownLineWrapThreshold" // NSNumber / int
-#define kTKCmdMarkdownLineMarginKey @"MarkdownLineWrapMargin" // NSNumber / int
-
-#define kTKCmdFixClassLocationsKey @"FixClassLocations" // NSNumber / BOOL
-#define kTKCmdRemoveEmptyParaKey @"RemoveEmptyParagraphs" // NSNumber / BOOL
-#define kTKCmdMergeCategoriesKey @"MergeCategories" // NSNumber / BOOL
-#define kTKCmdKeepMergedCategoriesSectionsKey @"KeepMergedSections" // NSNumber / BOOL
-
-#define kTKCmdObjectRefTemplate @"ObjectReferenceTemplate" // NSString
-#define kTKCmdMemberRefTemplate @"MemberReferenceTemplate" // NSString
-#define kTKCmdDateTimeTemplate @"DateTimeTemplate" // NSString
-#define kTKCmdCleanTempFilesKey @"CleanTemporaryFilesAfterBuild"// NSNumber / BOOL
-#define kTKCmdCleanBeforeBuildKey @"CleanOutputFilesBeforeBuild" // NSNumber / BOOL
-#define kTKCmdVerboseLevelKey @"VerboseLevel" // NSNumber / int
-
-#define kTKCmdEmitUtilityOutputKey @"EmitUtilityOutput" // NSNumber / BOOL
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////
-/** Defines the methods private for the @c CommandLineParser class.
-*/
-@interface CommandLineParser (ClassPrivateAPI)
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Global templates handling
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Setups the templates path.
-
-This method checks if template files are found on one of the known locations. It searches
-the following paths in this order:
-- <tt>~/.appledoc/</tt>
-- <tt>~/Library/Application Support/appledoc/</tt>
-If all required template files are found in one of these paths, the template path is
-automatically set to it.
-
-This will send @c parseTemplatesPath:() message for each known location.
-*/
-- (void) setupGlobalTemplates;
-
-/** Determines if the given path is a valid templates path or not.
-
-A path is considered valid templates path if it exists and contains all required
-template files. If the detected templates path also contains global parameters file
-@c Globals.plist, the file defaults are automatically read. These are all overriden by
-command line as expected.
-
-If parsing global parameters fails, error is logged but the execution continues.
-
-@param path The path to test.
-@return Returns @c YES if the given path is valid templates path, @c NO otherwise.
-*/
-- (BOOL) parseTemplatesPath:(NSString*) path;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Command line parsing
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Validates command line arguments after parsing.
-
-This function will make sure all required arguments and their values were correctly
-passed to the utility through the command line. This message is automatically sent from
-@c CommandLineParser::parseCommandLineArguments:ofCount:() immediately after parsing
-the command line.
-
-@exception NSException Thrown if validation fails.
-*/
-- (void) validateCommandLineArguments;
-
-/** Post-processes command line arguments.
-
-This message is sent after parsing the command line is finished. It will replace all
-template parameters (either from factory defaults or from globals plist) with the actual
-values and will prepare all dependent values. The message is automatically sent from
-@c CommandLineParser::parseCommandLineArguments:ofCount:().
-
-@see replaceTemplatePlaceholdersForKey:
-@see validateCommandLineArguments
-@see setupFactoryDefaults
-@see setupGlobalTemplates
-*/
-- (void) postProcessCommandLineArguments;
-
-/** Resets all parsed properties and variables required for parsing.
-*/
-- (void) setupFactoryDefaults;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Helper methods
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Replaces template placeholders for the given @c parameters key.
-
-This is where template placeholders from globals plist or factory defaults are replaced
-with the actual values from command line. Allowed placeholders are:
-- @c $PROJECT is replaced by the value from the @c --project switch.
-- @c $INPUT is replaced by the value from the @c --input switch.
-- @c $OUTPUT is replaced by the value from the @c --output switch.
-
-@param key The parameters key to update.
-*/
-- (void) replaceTemplatePlaceholdersForKey:(NSString*) key;
-
-/** Standardizes the path for the given @c parameters key.
-
-This will simply replace the @c NSString value of the given key with the existing value
-to which it will send @c stringByStandardizingPath message. It is just a
-convenience method that makes paths handling code simpler.
-
-@param key The parameters key to update.
-*/
-- (void) standardizePathForKey:(NSString*) key;
-
-/** Parses the assigned command line for the string with the given name or shortcut.
-
-If the argument is found, it's value is set to the @c parameters dictionary to the given
-@c key. If the argument is found, but value is missing, exception is thrown. For each
-argument, only one value is possible. The value should be separated by a whitespace. The
-argument may either consist of a long name (ussually started with double minus), shortcut
-(ussually started with a single minus) or both. However, at least one must be passed;
-the method will thrown exception if both, name and shortcut, are @c nil.
-
-@param shortcut Optional shortcut of the argument ir @c nil if not used.
-@param name Optional long name of the argument or @c nil if not used.
-@param key The key for which to set the value if found.
-@return Returns @c YES if the given option was found, @c NO otherwise.
-@exception NSException Thrown if both @c name and @c shortcut are @c nil or the
- argument is found, but it doesn't have a value associated. Also thrown if the given
- @c key is @c nil.
-@see parseIntegerWithShortcut:andName:forKey:
-@see parseBooleanWithShortcut:andName:withValue:forKey:
-*/
-- (BOOL) parseStringWithShortcut:(NSString*) shortcut
- andName:(NSString*) name
- forKey:(NSString*) key;
-
-/** Parses the assigned command line for the integer with the given name or shortcut.
-
-If the argument is found, it's value is set to the @c parameters dictionary to the given
-key. If the argument is found, but value is missing, exception is thrown. For each
-argument, only one value is possible. The value should be separated by a whitespace. The
-argument may either consist of a long name (ussually started with double minus), shortcut
-(ussually started with a single minus) or both. However, at least one must be passed;
-the method will thrown exception if both, name and shortcut, are @c nil.
-
-@param shortcut Optional shortcut of the argument ir @c nil if not used.
-@param name Optional long name of the argument or @c nil if not used.
-@param key The key for which to set the value if found.
-@return Returns @c YES if the given option was found, @c NO otherwise.
-@exception NSException Thrown if both @c name and @c shortcut are @c nil or the
- argument is found, but it doesn't have a value associated. Also thrown if the given
- @c key is @c nil.
-@see parseStringWithShortcut:andName:forKey:
-@see parseBooleanWithShortcut:andName:withValue:forKey:
-*/
-- (BOOL) parseIntegerWithShortcut:(NSString*) shortcut
- andName:(NSString*) name
- forKey:(NSString*) key;
-
-/** Parses the assigned command line for the switch with the given name or shortcut.
-
-If the switch is found, the given @c value is set to the @c parameters dictionary for the
-given key. The switch may either consist of a long name (ussually started with double minus),
-shortcut (ussually started with a single minus) or both. However, at least one must be
-passed; the method will thrown exception if both, name and shortcut, are @c nil.
-
-Note that in case @c name is specified, the method will automatically check if the
-negative form of the option is found and will use the negated @c value in such case.
-This is useful for overriding global parameters for example. If the @c name is @c --option,
-the method assumes the negative form is @c --no-option. If both forms are found in the
-command line, the last one encountered is used. Note that this only works properly for
-option names starting with a @c -- prefix.
-
-@param shortcut Optional shortcut of the switch ir @c nil if not used.
-@param name Optional long name of the switch or @c nil if not used.
-@param key The key for which to set the value if found.
-@param value The desired value to set for the given @c key if the switch is found.
-@return Returns @c YES if the given option was found, @c NO otherwise.
-@exception NSException Thrown if both @c name and @c shortcut are @c nil or @c key is @c nil.
-@see parseStringWithShortcut:andName:forKey:
-@see parseIntegerWithShortcut:andName:forKey:
-*/
-- (BOOL) parseBooleanWithShortcut:(NSString*) shortcut
- andName:(NSString*) name
- withValue:(BOOL) value
- forKey:(NSString*) key;
-
-/** Logs the given command line switch usage as debug log entry.
-
-Note that the method automatically outputs shortcut and/or name and automatically
-handles the value if passed. If any of the parameters are not applicable, pass @c nil
-instead.
-
-@param shortcut Options shortcut of the switch or @c nil if not used.
-@param name Optional name of the switch or @c nil if not used.
-@param value Optional value of the switch or @c nil if this is boolean switch.
-*/
-- (void) logCmdLineSwitch:(NSString*) shortcut
- andName:(NSString*) name
- andValue:(NSString*) value;
-
-@end
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-//////////////////////////////////////////////////////////////////////////////////////////
-
-@implementation CommandLineParser
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Initialization & disposal
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-+ (CommandLineParser*) sharedInstance
-{
- static CommandLineParser* result = nil;
- if (result == nil)
- {
- result = [[CommandLineParser alloc] init];
-
- }
- return result;
-}
-
-//----------------------------------------------------------------------------------------
-- (id)init
-{
- self = [super init];
- if (self)
- {
- commandLineArguments = [[NSMutableArray alloc] init];
- parameters = [[NSMutableDictionary alloc] init];
- }
- return self;
-}
-
-//----------------------------------------------------------------------------------------
-- (void) dealloc
-{
- [globalTemplatesPath release], globalTemplatesPath = nil;
- [commandLineArguments release], commandLineArguments = nil;
- [parameters release], parameters = nil;
- [super dealloc];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Command line parsing
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (void) parseCommandLineArguments:(const char**) argv
- ofCount:(int) argc
-{
- NSParameterAssert(argv != nil);
- NSParameterAssert(argc > 0);
-
- // Copy the command line arguments to internal array. Note that since the array
- // will retain all strings, we don't have to retain for each option separately.
- [commandLineArguments removeAllObjects];
- for (int i=0; i<argc; i++)
- {
- NSString* arg = [NSString stringWithCString:argv[i] encoding:NSASCIIStringEncoding];
- [commandLineArguments addObject:arg];
- }
-
- // Parse the verbose level first, so that we will correctly log as soon as possible.
- // Then log the utility command line.
- [self parseIntegerWithShortcut:@"-v" andName:@"--verbose" forKey:kTKCmdVerboseLevelKey];
- logNormal([self generator]);
- logNormal(@"Parsing command line arguments...");
- logVerbose([commandLineArguments objectAtIndex:0]);
-
- // Reset the parsing data and read the data from the global templates. This has to
- // be done after handling verbose switch, so that everything is correctly logged.
- [self setupFactoryDefaults];
- [self setupGlobalTemplates];
-
- // After factory defaults and globals are set, setup the command line (this would be
- // removed during factory defaults handling if set before) and again parse the verbose
- // switch so that it also gets properly logged...
- [parameters setObject:[commandLineArguments objectAtIndex:0] forKey:kTKCmdCommandLineKey];
- [self parseIntegerWithShortcut:@"-v" andName:@"--verbose" forKey:kTKCmdVerboseLevelKey];
-
- // Parse custom templates path parameters, then make sure all required files are found
- // there if specified. Note that this will override global parameters if globals.plist
- // is found on the custom path...
- if ([self parseStringWithShortcut:@"-t" andName:@"--templates" forKey:kTKCmdTemplatesPathKey])
- {
- if (![self parseTemplatesPath:self.templatesPath])
- {
- NSString* message = [NSString stringWithFormat:
- @"Custom templates path '%@' doesn't contain all required files!",
- self.templatesPath];
- logError(@"Failed parsing custom templates path at '%@'!", self.templatesPath);
- [Systemator throwExceptionWithName:kTKCommandLineException withDescription:message];
- }
- }
-
- // Parse the rest of the parameters.
- [self parseStringWithShortcut:@"-p" andName:@"--project" forKey:kTKCmdProjectNameKey];
- [self parseStringWithShortcut:@"-i" andName:@"--input" forKey:kTKCmdInputPathKey];
- [self parseStringWithShortcut:@"-o" andName:@"--output" forKey:kTKCmdOutputPathKey];
-
- [self parseStringWithShortcut:@"-d" andName:@"--doxygen" forKey:kTKCmdDoxygenCommandLineKey];
- [self parseStringWithShortcut:@"-c" andName:@"--doxyfile" forKey:kTKCmdDoxygenConfigFileKey];
-
- [self parseBooleanWithShortcut:nil andName:@"--xhtml" withValue:YES forKey:kTKCmdCreateCleanXHTMLKey];
- [self parseBooleanWithShortcut:nil andName:@"--docset" withValue:YES forKey:kTKCmdCreateDocSetKey];
- [self parseBooleanWithShortcut:nil andName:@"--markdown" withValue:YES forKey:kTKCmdCreateMarkdownKey];
-
- [self parseBooleanWithShortcut:nil andName:@"--xhtml-bordered-issues" withValue:YES forKey:kTKCmdXHTMLBorderedExamplesKey];
- [self parseBooleanWithShortcut:nil andName:@"--xhtml-bordered-issues" withValue:YES forKey:kTKCmdXHTMLBorderedWarningsKey];
- [self parseBooleanWithShortcut:nil andName:@"--xhtml-bordered-issues" withValue:YES forKey:kTKCmdXHTMLBorderedBugsKey];
-
- [self parseStringWithShortcut:nil andName:@"--docid" forKey:kTKCmdDocSetBundleIDKey];
- [self parseStringWithShortcut:nil andName:@"--docfeed" forKey:kTKCmdDocSetBundleFeedKey];
- [self parseStringWithShortcut:nil andName:@"--docplist" forKey:kTKCmdDocSetSourcePlistKey];
- [self parseStringWithShortcut:nil andName:@"--docutil" forKey:kTKCmdDocSetUtilCommandLinKey];
-
- [self parseBooleanWithShortcut:nil andName:@"--markdown-refstyle-links" withValue:YES forKey:kTKCmdMarkdownRefStyleLinksKey];
- [self parseIntegerWithShortcut:nil andName:@"--markdown-line-length" forKey:kTKCmdMarkdownLineLengthKey];
- [self parseIntegerWithShortcut:nil andName:@"--markdown-line-threshold" forKey:kTKCmdMarkdownLineThresholdKey];
- [self parseIntegerWithShortcut:nil andName:@"--markdown-line-margin" forKey:kTKCmdMarkdownLineMarginKey];
-
- [self parseStringWithShortcut:nil andName:@"--object-reference-template" forKey:kTKCmdObjectRefTemplate];
- [self parseStringWithShortcut:nil andName:@"--member-reference-template" forKey:kTKCmdMemberRefTemplate];
- [self parseStringWithShortcut:nil andName:@"--date-time-template" forKey:kTKCmdDateTimeTemplate];
-
- [self parseBooleanWithShortcut:nil andName:@"--fix-class-locations" withValue:YES forKey:kTKCmdFixClassLocationsKey];
- [self parseBooleanWithShortcut:nil andName:@"--merge-categories" withValue:YES forKey:kTKCmdMergeCategoriesKey];
- [self parseBooleanWithShortcut:nil andName:@"--keep-merged-sections" withValue:YES forKey:kTKCmdKeepMergedCategoriesSectionsKey];
- [self parseBooleanWithShortcut:nil andName:@"--remove-empty-paragraphs" withValue:YES forKey:kTKCmdRemoveEmptyParaKey];
- [self parseBooleanWithShortcut:nil andName:@"--clean-temp-files" withValue:YES forKey:kTKCmdCleanTempFilesKey];
- [self parseBooleanWithShortcut:nil andName:@"--clean-before-build" withValue:YES forKey:kTKCmdCleanBeforeBuildKey];
-
- // Parse undocumented options. These are used to debug the script.
- [self parseBooleanWithShortcut:nil andName:@"--no-utility-output" withValue:NO forKey:kTKCmdEmitUtilityOutputKey];
-
- // Validate and post process the command line arguments.
- [self validateCommandLineArguments];
- [self postProcessCommandLineArguments];
-
- // Log finish, write all used parameter values and make a gap if verbose settings
- // are desired.
- logInfo(@"Finished parsing command line arguments.");
- if ([[self logger] isDebugEnabled])
- {
- logDebug(@"Settings that will be used for this run are:");
- for (NSString* key in parameters)
- {
- logDebug(@"- '%@' = '%@'", key, [parameters objectForKey:key]);
- }
- }
- logVerbose(@"");
-}
-
-//----------------------------------------------------------------------------------------
-- (void) postProcessCommandLineArguments
-{
- // Standardize all paths.
- [self standardizePathForKey:kTKCmdInputPathKey];
- [self standardizePathForKey:kTKCmdOutputPathKey];
- [self standardizePathForKey:kTKCmdTemplatesPathKey];
- [self standardizePathForKey:kTKCmdDoxygenCommandLineKey];
- [self standardizePathForKey:kTKCmdDoxygenConfigFileKey];
- [self standardizePathForKey:kTKCmdDocSetSourcePlistKey];
- [self standardizePathForKey:kTKCmdDocSetUtilCommandLinKey];
-
- // Replace template placeholders for all possible parameters.
- [self replaceTemplatePlaceholdersForKey:kTKCmdDoxygenConfigFileKey];
- [self replaceTemplatePlaceholdersForKey:kTKCmdDocSetBundleIDKey];
- [self replaceTemplatePlaceholdersForKey:kTKCmdDocSetBundleFeedKey];
- [self replaceTemplatePlaceholdersForKey:kTKCmdDocSetSourcePlistKey];
-
- // Make sure the documentation set bundle ID ends with .docset.
- if (![self.docsetBundleID hasSuffix:@".docset"])
- {
- NSString* docsetBundleID = [self.docsetBundleID stringByAppendingPathExtension:@"docset"];
- [parameters setObject:docsetBundleID forKey:kTKCmdDocSetBundleIDKey];
- }
-
- // If documentation set output is enabled, enable also XHTML generation.
- if (self.createDocSet && !self.createCleanXHTML)
- {
- logNormal(@"Enablind XHTML creation because --docset is used!");
- [parameters setObject:[NSNumber numberWithBool:YES] forKey:kTKCmdCreateCleanXHTMLKey];
- }
-
- // Make sure remove output files is reset if output path is the same as input.
- if (self.cleanOutputFilesBeforeBuild && [self.outputPath isEqualToString:self.inputPath])
- {
- logNormal(@"Disabling --cleanbuild because output path is equal to input path!");
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdCleanBeforeBuildKey];
- }
-}
-
-//----------------------------------------------------------------------------------------
-- (void) validateCommandLineArguments
-{
- // Make sure all required parameters are there.
- if (!self.projectName)
- [Systemator throwExceptionWithName:kTKCmdCommandLineKey
- withDescription:@"Project name is required parameter"];
- if (!self.inputPath)
- [Systemator throwExceptionWithName:kTKCmdCommandLineKey
- withDescription:@"Input path is required parameter"];
- if (!self.outputPath)
- [Systemator throwExceptionWithName:kTKCmdCommandLineKey
- withDescription:@"Output path is required parameter"];
-}
-
-//----------------------------------------------------------------------------------------
-- (void) printUsage
-{
- printf("USAGE: appledoc [options]\n");
- printf("VERSION: %s\n", [[self version] cStringUsingEncoding:NSASCIIStringEncoding]);
- printf("\n");
- printf("OPTIONS - required\n");
- printf("-p --project <name>\n");
- printf("-i --input <path>\n");
- printf("-o --output <path>\n");
- printf("\n");
- printf("OPTIONS - doxygen\n");
- printf("-c --doxyfile <path>\n");
- printf("-d --doxygen <path>\n");
- printf("\n");
- printf("OPTIONS - clean XML creation\n");
- printf(" --fix-class-locations\n");
- printf(" --remove-empty-paragraphs\n");
- printf(" --merge-categories\n");
- printf(" --keep-merged-sections\n");
- printf("\n");
- printf("OPTIONS - clean output creation\n");
- printf(" --xhtml\n");
- printf(" --docset\n");
- printf(" --markdown\n");
- printf("\n");
- printf("OPTIONS - XHTML output creation\n");
- printf(" --xhtml-bordered-issues\n");
- printf("\n");
- printf("OPTIONS - documentation set\n");
- printf(" --docid <id>\n");
- printf(" --docfeed <name>\n");
- printf(" --docplist <path>\n");
- printf(" --docutil <path>\n");
- printf("\n");
- printf("OPTIONS - Markdown output creation\n");
- printf(" --markdown-line-length <number>\n");
- printf(" --markdown-line-threshold <number>\n");
- printf(" --markdown-line-margin <number>\n");
- printf(" --markdown-refstyle-links\n");
- printf("\n");
- printf("OPTIONS - miscellaneous\n");
- printf(" --object-reference-template\n");
- printf(" --member-reference-template\n");
- printf(" --clean-temp-files\n");
- printf(" --clean-before-build\n");
- printf("-t --templates <path>\n");
- printf("-v --verbose <level>\n");
- printf("\n");
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Global templates handling
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (void) setupFactoryDefaults
-{
- // Remove all parameters.
- [parameters removeAllObjects];
-
- // Setup the default documentation set installation path.
- [parameters setObject:[NSHomeDirectory()
- stringByAppendingPathComponent:@"Library/Developer/Shared/Documentation/DocSets"]
- forKey:kTKCmdDocSetInstallPathKey];
-
- // Setup default doxygen parameters.
- [parameters setObject:@"/opt/local/bin/doxygen" forKey:kTKCmdDoxygenCommandLineKey];
- [parameters setObject:@"$INPUT/Doxyfile" forKey:kTKCmdDoxygenConfigFileKey];
-
- // Setup default documentation set parameters.
- [parameters setObject:@"com.custom.$PROJECT.docset" forKey:kTKCmdDocSetBundleIDKey];
- [parameters setObject:@"Custom documentation" forKey:kTKCmdDocSetBundleFeedKey];
- [parameters setObject:@"$INPUT/DocSet-Info.plist" forKey:kTKCmdDocSetSourcePlistKey];
- [parameters setObject:@"/Developer/usr/bin/docsetutil" forKey:kTKCmdDocSetUtilCommandLinKey];
- [parameters setObject:[NSNumber numberWithBool:YES] forKey:kTKCmdCreateDocSetKey];
-
- // Setup the default verbose level and switches. Note that we would only need to
- // initialize those which default value is YES since NO is returned by default if
- // a boolValue is sent to nil object, but to make future changes more meaningful,
- // all are included.
- [parameters setObject:[NSNumber numberWithInt:kTKVerboseLevelError] forKey:kTKCmdVerboseLevelKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdFixClassLocationsKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdMergeCategoriesKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdKeepMergedCategoriesSectionsKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdRemoveEmptyParaKey];
-
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdCreateCleanXHTMLKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdCreateDocSetKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdCreateMarkdownKey];
-
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdMarkdownRefStyleLinksKey];
- [parameters setObject:[NSNumber numberWithInt:80] forKey:kTKCmdMarkdownLineLengthKey];
- [parameters setObject:[NSNumber numberWithInt:7] forKey:kTKCmdMarkdownLineThresholdKey];
- [parameters setObject:[NSNumber numberWithInt:12] forKey:kTKCmdMarkdownLineMarginKey];
-
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdCleanTempFilesKey];
- [parameters setObject:[NSNumber numberWithBool:NO] forKey:kTKCmdCleanBeforeBuildKey];
-
- // Setup other properties.
- [parameters setObject:@"$PREFIX[$OBJECT $MEMBER]" forKey:kTKCmdObjectRefTemplate];
- [parameters setObject:@"$PREFIX $MEMBER" forKey:kTKCmdMemberRefTemplate];
- [parameters setObject:@"(Last updated: %Y-%m-%d)" forKey:kTKCmdDateTimeTemplate];
- [parameters setObject:[NSNumber numberWithBool:YES] forKey:kTKCmdEmitUtilityOutputKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (void) setupGlobalTemplates
-{
- // Check user's root.
- globalTemplatesPath = [NSHomeDirectory() stringByAppendingPathComponent:@".appledoc"];
- logVerbose(@"Testing '%@' for templates...", globalTemplatesPath);
- if ([self parseTemplatesPath:globalTemplatesPath])
- {
- [globalTemplatesPath retain];
- return;
- }
-
- // Check application support.
- NSArray* paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
- for (NSString* path in paths)
- {
- globalTemplatesPath = [path stringByAppendingPathComponent:@"appledoc"];
- logVerbose(@"Testing '%@' for templates...", globalTemplatesPath);
- if ([self parseTemplatesPath:globalTemplatesPath])
- {
- [globalTemplatesPath retain];
- return;
- }
- }
-
- // Set the global templates to nil if neither location is valid.
- globalTemplatesPath = nil;
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) parseTemplatesPath:(NSString*) path
-{
- NSFileManager* manager = [NSFileManager defaultManager];
-
- // First make sure the given path exists. Then check for all the required templates.
- if ([manager fileExistsAtPath:path] &&
- [manager fileExistsAtPath:[path stringByAppendingPathComponent:@"object.xslt"]] &&
- [manager fileExistsAtPath:[path stringByAppendingPathComponent:@"screen.css"]])
- {
- // If the path contains all required template files, check if it also contains
- // global parameters. If so, read them into the program.
- NSString* globalParametersFile = [path stringByAppendingPathComponent:@"Globals.plist"];
- if ([manager fileExistsAtPath:globalParametersFile])
- {
- logVerbose(@"Reading global parameters from '%@'...", globalParametersFile);
-
- @try
- {
- // Copy the global parameters into the parameters dictionary. Note that this
- // will override factory settings. Then set the path to the templates folder.
- NSDictionary* globals = [Systemator readPropertyListFromFile:globalParametersFile];
- [parameters addEntriesFromDictionary:globals];
- [parameters setObject:path forKey:kTKCmdTemplatesPathKey];
- }
- @catch (NSException* e)
- {
- logError(@"Failed reading global templates, error was %@!", [e reason]);
- return NO;
- }
- }
- return YES;
- }
-
- return NO;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Helper methods
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (void) replaceTemplatePlaceholdersForKey:(NSString*) key
-{
- NSString* value = [parameters objectForKey:key];
-
- value = [value stringByReplacingOccurrencesOfString:@"$PROJECT"
- withString:[parameters objectForKey:kTKCmdProjectNameKey]];
- value = [value stringByReplacingOccurrencesOfString:@"$INPUT"
- withString:[parameters objectForKey:kTKCmdInputPathKey]];
- value = [value stringByReplacingOccurrencesOfString:@"$OUTPUT"
- withString:[parameters objectForKey:kTKCmdOutputPathKey]];
-
- [parameters setObject:value forKey:key];
-}
-
-//----------------------------------------------------------------------------------------
-- (void) standardizePathForKey:(NSString*) key
-{
- NSString* value = [parameters objectForKey:key];
- [parameters setObject:[value stringByStandardizingPath] forKey:key];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) parseStringWithShortcut:(NSString*) shortcut
- andName:(NSString*) name
- forKey:(NSString*) key
-{
- NSParameterAssert(name != nil || shortcut != nil);
- NSParameterAssert(key != nil);
- for (int i=1; i<[commandLineArguments count]; i++)
- {
- NSString* arg = [commandLineArguments objectAtIndex:i];
- if ([arg isEqualToString:name] || [arg isEqualToString:shortcut])
- {
- if (i == [commandLineArguments count] - 1)
- {
- NSString* reason = [NSString stringWithFormat:@"Missing parameter value for %@ / %@ switch!",
- shortcut,
- name];
- @throw [NSException exceptionWithName:kTKCommandLineException
- reason:reason
- userInfo:nil];
- }
-
- NSString* value = [commandLineArguments objectAtIndex:i+1];
- [self logCmdLineSwitch:shortcut andName:name andValue:value];
- [parameters setObject:value forKey:key];
- return YES;
- }
- }
- return NO;
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) parseIntegerWithShortcut:(NSString*) shortcut
- andName:(NSString*) name
- forKey:(NSString*) key
-{
- NSParameterAssert(name != nil || shortcut != nil);
- NSParameterAssert(key != nil);
- for (int i=1; i<[commandLineArguments count]; i++)
- {
- NSString* arg = [commandLineArguments objectAtIndex:i];
- if ([arg isEqualToString:name] || [arg isEqualToString:shortcut])
- {
- if (i == [commandLineArguments count] - 1)
- {
- NSString* reason = [NSString stringWithFormat:@"Missing parameter value for %@ / %@ switch!",
- shortcut,
- name];
- @throw [NSException exceptionWithName:kTKCommandLineException
- reason:reason
- userInfo:nil];
- }
-
- NSString* value = [commandLineArguments objectAtIndex:i+1];
- [self logCmdLineSwitch:shortcut andName:name andValue:value];
- [parameters setObject:[NSNumber numberWithInt:[value intValue]] forKey:key];
- return YES;
- }
- }
- return NO;
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) parseBooleanWithShortcut:(NSString*) shortcut
- andName:(NSString*) name
- withValue:(BOOL) value
- forKey:(NSString*) key
-{
- NSParameterAssert(name != nil || shortcut != nil);
- NSParameterAssert(key != nil);
-
- // Prepare the negative form of the long name.
- NSString* negative = nil;
- if (name)
- {
- negative = [name substringFromIndex:2];
- negative = [NSString stringWithFormat:@"--no-%@", negative];
- }
-
- BOOL result = NO;
- for (NSString* arg in commandLineArguments)
- {
- if ([arg isEqualToString:name] || [arg isEqualToString:shortcut])
- {
- [self logCmdLineSwitch:shortcut andName:name andValue:nil];
- [parameters setObject:[NSNumber numberWithBool:value] forKey:key];
- result = YES;
- }
- else if (negative && [arg isEqualToString:negative])
- {
- [self logCmdLineSwitch:nil andName:negative andValue:nil];
- [parameters setObject:[NSNumber numberWithBool:!value] forKey:key];
- result = YES;
- }
- }
- return result;
-}
-
-//----------------------------------------------------------------------------------------
-- (void) logCmdLineSwitch:(NSString*) shortcut
- andName:(NSString*) name
- andValue:(NSString*) value
-{
- if (self.verboseLevel >= kTKVerboseLevelInfo)
- {
- NSMutableString* output = [[NSMutableString alloc] init];
-
- // Append shortcut. If not used, use spacer.
- if (shortcut)
- {
- [output appendFormat:@"%@ ", shortcut];
- if (name) [output appendString:@"/ "];
- }
- else
- {
- [output appendString:@" "];
- }
-
-
- // Append name.
- if (name)
- {
- [output appendString:name];
- }
-
- // Append value or usage.
- if (value)
- [output appendFormat:@": %@.", value];
- else
- [output appendString:@": used."];
-
- // Log the string.
- logVerbose(@"%@", output);
- [output release];
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - required
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (NSString*) commandLine
-{
- return [parameters objectForKey:kTKCmdCommandLineKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) projectName
-{
- return [parameters objectForKey:kTKCmdProjectNameKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) inputPath
-{
- return [parameters objectForKey:kTKCmdInputPathKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) outputPath
-{
- return [parameters objectForKey:kTKCmdOutputPathKey];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - doxygen
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (NSString*) doxygenCommandLine
-{
- return [parameters objectForKey:kTKCmdDoxygenCommandLineKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) doxygenConfigFilename
-{
- return [parameters objectForKey:kTKCmdDoxygenConfigFileKey];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - clean XML creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (BOOL) fixClassLocations
-{
- return [[parameters objectForKey:kTKCmdFixClassLocationsKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) removeEmptyParagraphs
-{
- return [[parameters objectForKey:kTKCmdRemoveEmptyParaKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) mergeKnownCategoriesToClasses
-{
- return [[parameters objectForKey:kTKCmdMergeCategoriesKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) keepMergedCategorySections
-{
- return [[parameters objectForKey:kTKCmdKeepMergedCategoriesSectionsKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) objectReferenceTemplate
-{
- return [parameters objectForKey:kTKCmdObjectRefTemplate];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) memberReferenceTemplate
-{
- return [parameters objectForKey:kTKCmdMemberRefTemplate];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) dateTimeTemplate
-{
- return [parameters objectForKey:kTKCmdDateTimeTemplate];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - clean output creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (BOOL) createCleanXHTML
-{
- return [[parameters objectForKey:kTKCmdCreateCleanXHTMLKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) createDocSet
-{
- return [[parameters objectForKey:kTKCmdCreateDocSetKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) createMarkdown
-{
- return [[parameters objectForKey:kTKCmdCreateMarkdownKey] boolValue];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - XHTML creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (BOOL) xhtmlUseBorderedExamples
-{
- return [[parameters objectForKey:kTKCmdXHTMLBorderedExamplesKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) xhtmlUseBorderedWarnings
-{
- return [[parameters objectForKey:kTKCmdXHTMLBorderedWarningsKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) xhtmlUseBorderedBugs
-{
- return [[parameters objectForKey:kTKCmdXHTMLBorderedBugsKey] boolValue];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - documentation set creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (NSString*) docsetBundleID
-{
- return [parameters objectForKey:kTKCmdDocSetBundleIDKey];
-}
-- (void) setDocsetBundleID:(NSString*) value
-{
- [parameters setObject:value forKey:kTKCmdDocSetBundleIDKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) docsetBundleFeed
-{
- return [parameters objectForKey:kTKCmdDocSetBundleFeedKey];
-}
-- (void) setDocsetBundleFeed:(NSString*) value
-{
- [parameters setObject:value forKey:kTKCmdDocSetBundleFeedKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) docsetSourcePlistPath
-{
- return [parameters objectForKey:kTKCmdDocSetSourcePlistKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) docsetutilCommandLine
-{
- return [parameters objectForKey:kTKCmdDocSetUtilCommandLinKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) docsetInstallPath
-{
- return [parameters objectForKey:kTKCmdDocSetInstallPathKey];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - Markdown creation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (BOOL) markdownReferenceStyleLinks
-{
- return [[parameters objectForKey:kTKCmdMarkdownRefStyleLinksKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (int) markdownLineLength
-{
- return [[parameters objectForKey:kTKCmdMarkdownLineLengthKey] intValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (int) markdownLineWrapThreshold
-{
- return [[parameters objectForKey:kTKCmdMarkdownLineThresholdKey] intValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (int) markdownLineWrapMargin
-{
- return [[parameters objectForKey:kTKCmdMarkdownLineMarginKey] intValue];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - miscellaneous
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (NSString*) templatesPath
-{
- return [parameters objectForKey:kTKCmdTemplatesPathKey];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) cleanTempFilesAfterBuild
-{
- return [[parameters objectForKey:kTKCmdCleanTempFilesKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (BOOL) cleanOutputFilesBeforeBuild
-{
- return [[parameters objectForKey:kTKCmdCleanBeforeBuildKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (int) verboseLevel
-{
- return [[parameters objectForKey:kTKCmdVerboseLevelKey] intValue];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties - undocumented
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (BOOL) emitUtilityOutput
-{
- return [[parameters objectForKey:kTKCmdEmitUtilityOutputKey] boolValue];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) generator
-{
- return [NSString stringWithFormat:@"appledoc v%@", self.version];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) version
-{
- return @"1.0.5";
-}
-
-@end
View
44 Constants.h
@@ -1,44 +0,0 @@
-//
-// Constants.h
-// appledoc
-//
-// Created by Tomaz Kragelj on 12.6.09.
-// Copyright (C) 2009, Tomaz Kragelj. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-extern NSString* kTKConverterException;
-
-extern NSString* kTKPlaceholderExtension;
-
-extern NSString* kTKDirClasses;
-extern NSString* kTKDirCategories;
-extern NSString* kTKDirProtocols;
-extern NSString* kTKDirCSS;
-extern NSString* kTKDirDocSet;
-
-extern NSString* kTKDataMainIndexKey;
-extern NSString* kTKDataMainHierarchyKey;
-extern NSString* kTKDataMainHierarchiesKey;
-extern NSString* kTKDataMainObjectsKey;
-extern NSString* kTKDataMainDirectoriesKey;
-
-extern NSString* kTKDataHierarchyObjectNameKey;
-extern NSString* kTKDataHierarchyObjectDataKey;
-extern NSString* kTKDataHierarchyChildrenKey;
-extern NSString* kTKDataHierarchyTempKey;
-
-extern NSString* kTKDataObjectNameKey;
-extern NSString* kTKDataObjectKindKey;
-extern NSString* kTKDataObjectClassKey;
-extern NSString* kTKDataObjectMarkupKey;
-extern NSString* kTKDataObjectMembersKey;
-extern NSString* kTKDataObjectParentKey;
-extern NSString* kTKDataObjectRelDirectoryKey;
-extern NSString* kTKDataObjectRelPathKey;
-extern NSString* kTKDataObjectDoxygenFilenameKey;
-
-extern NSString* kTKDataMemberNameKey;
-extern NSString* kTKDataMemberPrefixKey;
-extern NSString* kTKDataMemberSelectorKey;
View
60 Constants.m
@@ -1,60 +0,0 @@
-//
-// Constants.m
-// appledoc
-//
-// Created by Tomaz Kragelj on 12.6.09.
-// Copyright (C) 2009, Tomaz Kragelj. All rights reserved.
-//
-
-#import "Constants.h"
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Exception names
-//////////////////////////////////////////////////////////////////////////////////////////
-
-NSString* kTKConverterException = @"TKConverterException";
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Placeholder strings
-//////////////////////////////////////////////////////////////////////////////////////////
-
-NSString* kTKPlaceholderExtension = @"$EXTENSION";
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Common directory structure
-//////////////////////////////////////////////////////////////////////////////////////////
-
-NSString* kTKDirClasses = @"Classes";
-NSString* kTKDirCategories = @"Categories";
-NSString* kTKDirProtocols = @"Protocols";
-NSString* kTKDirCSS = @"css";
-NSString* kTKDirDocSet = @"docset";
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Database keys
-//////////////////////////////////////////////////////////////////////////////////////////
-
-NSString* kTKDataMainIndexKey = @"Index"; // NSXMLDocument
-NSString* kTKDataMainHierarchyKey = @"Hierarchy"; // NSXMLDocument
-NSString* kTKDataMainHierarchiesKey = @"Hierarchies"; // NSDictionary
-NSString* kTKDataMainObjectsKey = @"Objects"; // NSDictionary
-NSString* kTKDataMainDirectoriesKey = @"Directories"; // NSDictionary
-
-NSString* kTKDataHierarchyObjectNameKey = @"ObjectName"; // NSString
-NSString* kTKDataHierarchyObjectDataKey = @"ObjectData"; // NSDictionary
-NSString* kTKDataHierarchyChildrenKey = @"Children"; // NSString
-NSString* kTKDataHierarchyTempKey = @"TEMPORARY"; // NSNumber / BOOL
-
-NSString* kTKDataObjectNameKey = @"ObjectName"; // NSString
-NSString* kTKDataObjectKindKey = @"ObjectKind"; // NSString
-NSString* kTKDataObjectClassKey = @"ObjectClass"; // NSString
-NSString* kTKDataObjectMarkupKey = @"CleanedMarkup"; // NSXMLDocument
-NSString* kTKDataObjectMembersKey = @"Members"; // NSDictionary
-NSString* kTKDataObjectParentKey = @"Parent"; // NSString
-NSString* kTKDataObjectRelDirectoryKey = @"RelativeDirectory"; // NSString
-NSString* kTKDataObjectRelPathKey = @"RelativePath"; // NSString
-NSString* kTKDataObjectDoxygenFilenameKey = @"DoxygenMarkupFilename"; // NSString
-
-NSString* kTKDataMemberNameKey = @"Name"; // NSString
-NSString* kTKDataMemberPrefixKey = @"Prefix"; // NSString
-NSString* kTKDataMemberSelectorKey = @"Selector"; // NSString
View
12 DocSet-Info.plist
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleIdentifier</key>
- <string>si.tkragelj.appledoc.docset</string>
- <key>CFBundleName</key>
- <string>appledoc</string>
- <key>DocSetFeedName</key>
- <string>Custom documentation</string>
-</dict>
-</plist>
View
150 DocSetOutputGenerator.h
@@ -1,150 +0,0 @@
-//
-// DocSetOutputGenerator.h
-// appledoc
-//
-// Created by Tomaz Kragelj on 11.6.09.
-// Copyright (C) 2009, Tomaz Kragelj. All rights reserved.
-//
-
-#import "OutputGenerator.h"
-
-//////////////////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////
-/** Defines a concrete @c OutputGenerator which generates documentation set.
-
-The generator depends on @c XMLOutputGenerator and @c XHTMLOutputGenerator output. It
-generates the documentation set source plist, index and nodes XML source files, invokes
-indexing through the @c docsetutils command line utility and installs the documentation
-set to the Xcode documentation window.
-
-Since the @c DocSetOutputGenerator doesn't generate the actual content files itself, it
-must be given the locations, names and extensions of the source files. This should be
-set through the @c documentationFilesInfoProvider() property before generation starts. If the
-clients forget to set this property, generation will fail immediately.
-*/
-@interface DocSetOutputGenerator : OutputGenerator
-{
- id<OutputInfoProvider> documentationFilesInfoProvider;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Documentation set handling
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Creates the DocSet source plist file.
-
-This file is used when creating the documentation set. The file is only created if it
-doesn't exist yet. If it exists, this method will exit without doing anything. This
-allows the user to change the data in the file as he see fit after it was created.
-
-This message is automatically sent from @c generateSpecificOutput() in the proper order.
-It is not designed to be sent manually from the clients.
-
-@exception NSException Thrown if creating the plist file fails.
-@see createDocSetNodesFile
-@see createDocSetTokesFile
-@see createDocSetBundle
-*/
-- (void) createDocSetSourcePlistFile;
-
-/** Creates DocSet Nodes.xml file.
-
-The Nodes.xml file describes the structure of the documentation set and is used to
-create a table of contents that users see in the Xcode documentation window. This file
-is required when compiling the documentation set.
-
-This message is automatically sent from @c generateSpecificOutput() in the proper order.
-It is not designed to be sent manually from the clients.
-
-@exception NSException Thrown if creation fails.
-@see createDocSetSourcePlistFile
-@see createDocSetTokesFile
-@see createDocSetBundle
-@see addDocSetNodeToElement:fromHierarchyData:
-*/
-- (void) createDocSetNodesFile;
-
-/** Creates DocSet Tokens.xml file.
-
-The Tokens.xml file associate symbol names with locations in the documentation files.
-This file is used for creating the symbol index for the documentation set.
-
-This message is automatically sent from @c generateSpecificOutput() in the proper order.
-It is not designed to be sent manually from the clients.
-
-@exception NSException Thrown if creation fails.
-@see createDocSetSourcePlistFile
-@see createDocSetNodesFile
-@see createDocSetBundle
-*/
-- (void) createDocSetTokesFile;
-
-/** Creates DocSet bundle.
-
-This message should be sent after all source files required for documentation set creation
-have been created. It will copy all html files found at path returned from
-@c documentationFilesInfoProvider to the documentation set output directory and will
-invoke the indexing of the files with the help of nodes and tokes files.
-
-This message is automatically sent from @c generateSpecificOutput() in the proper order.
-It is not designed to be sent manually from the clients.
-
-@exception NSException Thrown if creation fails.
-@see createDocSetSourcePlistFile
-@see createDocSetNodesFile
-@see createDocSetTokesFile
-@see addDocSetNodeToElement:fromHierarchyData:
-*/
-- (void) createDocSetBundle;
-
-/** Adds a new DocSet node as the child of the given parent element.
-
-The given hierarchy data contains the description of the node to add. The added node is
-either of the type folder if it contains children or it is a leaf otherwise. The methods
-will recursively add all subnodes as well.
-
-@param parent The Nodes.xml element to which to add new node.
-@param data The hierarchy object data that describes the node.
-@exception NSException Thrown if adding fails.
-@see createDocSetNodesFile
-*/
-- (void) addDocSetNodeToElement:(NSXMLElement*) parent
- fromHierarchyData:(NSDictionary*) data;
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Properties
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/** Sets or returns the @c OutputInfoProvider conformer that provides information about
-documentation files which should be included in the documentation set.
-
-This value is used to determine the path to the documentation HTML files so that they
-can be copied to the documentation set.
-
-@warning Clients need to set this before starting output generation. If they fail to
- provide a valid object, generation immediately fails with an exception.
-*/
-@property(retain) id<OutputInfoProvider> documentationFilesInfoProvider;
-
-/** Returns the temporary documentation set contents path.
-
-@see outputResourcesPath
-@see outputDocumentsPath
-*/
-@property(readonly) NSString* outputContentsPath;
-
-/** Returns the temporary documentation set resources path.
-
-@see outputContentsPath
-@see outputDocumentsPath
-*/
-@property(readonly) NSString* outputResourcesPath;
-
-/** Returns the temporary documentation set documents path.
-
-@see outputContentsPath
-@see outputResourcesPath
-*/
-@property(readonly) NSString* outputDocumentsPath;
-
-@end
View
475 DocSetOutputGenerator.m
@@ -1,475 +0,0 @@
-//
-// DocSetOutputGenerator.m
-// appledoc
-//
-// Created by Tomaz Kragelj on 11.6.09.
-// Copyright (C) 2009, Tomaz Kragelj. All rights reserved.
-//
-
-#import "DocSetOutputGenerator.h"
-#import "CommandLineParser.h"
-#import "LoggingProvider.h"
-#import "Systemator.h"
-
-@implementation DocSetOutputGenerator
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark OutputInfoProvider protocol implementation
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (NSString*) outputFilesExtension
-{
- return @".html";
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) outputBasePath
-{
- return [cmd.outputPath stringByAppendingPathComponent:@"docset"];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) outputContentsPath
-{
- return [self.outputBasePath stringByAppendingPathComponent:@"Contents"];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) outputResourcesPath
-{
- return [self.outputContentsPath stringByAppendingPathComponent:@"Resources"];
-}
-
-//----------------------------------------------------------------------------------------
-- (NSString*) outputDocumentsPath
-{
- return [self.outputResourcesPath stringByAppendingPathComponent:@"Documents"];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Specific output generation entry points
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (BOOL) isOutputGenerationEnabled
-{
- return cmd.createDocSet;
-}
-
-//----------------------------------------------------------------------------------------
-- (void) generateSpecificOutput
-{
- if (!self.documentationFilesInfoProvider)
- [Systemator throwExceptionWithName:kTKConverterException
- withDescription:@"documentationFilesInfoProvider not set"];
-
- [self createDocSetSourcePlistFile];
- [self createDocSetNodesFile];
- [self createDocSetTokesFile];
- [self createDocSetBundle];
-}
-
-//----------------------------------------------------------------------------------------
-- (void) createOutputDirectories
-{
- // Note that we only manually create temporary documentation set directory here,
- // if the documentation set is installed, it will be copied as a bundle to the
- // appropriate path.
- [Systemator createDirectory:[self outputBasePath]];
- [Systemator createDirectory:[self outputContentsPath]];
- [Systemator createDirectory:[self outputResourcesPath]];
- [Systemator createDirectory:[self outputDocumentsPath]];
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Documentation set handling
-//////////////////////////////////////////////////////////////////////////////////////////
-
-//----------------------------------------------------------------------------------------
-- (void) createDocSetSourcePlistFile
-{
- // If the docset source plist doesn't yet exist, create it, otherwise read the data
- // from it in case the user changes it.
- if (![manager fileExistsAtPath:cmd.docsetSourcePlistPath])
- {
- logNormal(@"Creating DocSet info plist...");
-
- // Create the dictionary and populate it with data.
- NSMutableDictionary* docsetInfo = [[NSMutableDictionary alloc] init];
- [docsetInfo setObject:cmd.docsetBundleID forKey:(NSString*)kCFBundleIdentifierKey];
- [docsetInfo setObject:cmd.projectName forKey:(NSString*)kCFBundleNameKey];
- [docsetInfo setObject:cmd.docsetBundleFeed forKey:@"DocSetFeedName"];
-
- // Convert the dictionary to property list. Exit if anything goes wrong.
- @try
- {
- [Systemator writePropertyList:docsetInfo toFile:cmd.docsetSourcePlistPath];
- }
- @finally
- {
- [docsetInfo release];
- }
-
- logInfo(@"Finished creating DocSet info plist.");
- }
-
- // If the plist already exists, read the data from it and set it to command line
- // parser so the rest of the code execute after this already uses it. Note that we
- // don't have to handle this if the file doesn't exists - we just created it and
- // populated with default options in such case.
- else
- {
- logNormal(@"Reading DocSet info plist data...");
-
- @try
- {
- // Read the property list from the file and extract the properties.
- NSString* value = nil;
- NSDictionary* docsetInfo = [Systemator readPropertyListFromFile:cmd.docsetSourcePlistPath];
-
- value = [docsetInfo objectForKey:(NSString*)kCFBundleIdentifierKey];
- if (value)
- {
- logVerbose(@"- Updating DocSet bundle ID '%@' from info plist...", value);
- cmd.docsetBundleID = value;
- }
-
- value = [docsetInfo objectForKey:@"DocSetFeedName"];
- if (value)
- {
- logVerbose(@"- Updating DocSet bundle feed '%@' from info plist...", value);
- cmd.docsetBundleFeed = value;
- }
-
- }
- @catch (NSException* e)
- {
- logError(@"Failed readong DocSet info plist data from '%@', error was %@!",
- cmd.docsetSourcePlistPath,
- [e reason]);
- @throw;
- }
- logInfo(@"Finished reading DocSet info plist data.");
- }
-}
-
-//----------------------------------------------------------------------------------------
-- (void) createDocSetNodesFile
-{
- logNormal(@"Creating DocSet Nodes.xml file...");
- NSAutoreleasePool* loopAutoreleasePool = [[NSAutoreleasePool alloc] init];
- NSXMLDocument* document = [NSXMLDocument document];
- NSString* indexFileName = [documentationFilesInfoProvider outputIndexFilename];
- NSString* hierarchyFileName = [documentationFilesInfoProvider outputHierarchyFilename];
-
- // Create the version and ecoding elements.
- [document setVersion:@"1.0"];
- [document setCharacterEncoding:@"UTF-8"];
-
- // Create the root <DocSetNodes version="1.0"> element.
- NSXMLElement* rootElement = [NSXMLNode elementWithName:@"DocSetNodes"];
- [rootElement addAttribute:[NSXMLNode attributeWithName:@"version" stringValue:@"1.0"]];
- [document setRootElement:rootElement];
-
- // Create <TOC> element.
- NSXMLElement* tocElement = [NSXMLNode elementWithName:@"TOC"];
- [rootElement addChild:tocElement];
-
- // Create <Node> element for main index file and all it's descriptors.
- NSXMLElement* indexNodeElement = [NSXMLNode elementWithName:@"Node"];
- [tocElement addChild:indexNodeElement];
- NSXMLElement* indexNameElement = [NSXMLNode elementWithName:@"Name" stringValue:cmd.projectName];
- [indexNodeElement addChild:indexNameElement];
- NSXMLElement* indexPathElement = [NSXMLNode elementWithName:@"Path" stringValue:indexFileName];
- [indexNodeElement addChild:indexPathElement];
- NSXMLElement* indexSubnodesElement = [NSXMLNode elementWithName:@"Subnodes"];
- [indexNodeElement addChild:indexSubnodesElement];
-
- // Since we will create the structure that groups classes, categories and protocols
- // we'll use the directories key - it is structured in exactly the desired way.
- NSDictionary* directories = [database objectForKey:kTKDataMainDirectoriesKey];
- for (NSString* directoryName in directories)
- {
- // Create the node for the directory. The directory node is of type folder and
- // since we don't use a separate html page for it, we map it to the main index.
- NSXMLElement* directoryNodeElement = [NSXMLNode elementWithName:@"Node"];
- [directoryNodeElement addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"folder"]];
- [indexSubnodesElement addChild:directoryNodeElement];
- NSXMLElement* directoryNameElement = [NSXMLNode elementWithName:@"Name" stringValue:directoryName];
- [directoryNodeElement addChild:directoryNameElement];
- NSXMLElement* directoryPathElement = [NSXMLNode elementWithName:@"Path" stringValue:indexFileName];
- [directoryNodeElement addChild:directoryPathElement];
- NSXMLElement* directorySubnodesElement = [NSXMLNode elementWithName:@"Subnodes"];
- [directoryNodeElement addChild:directorySubnodesElement];
-
- // The directory is represented by an array of object data dictionaries which are
- // simply links to the main "Objects" dictionary, so we can use the data from there.
- NSArray* directoryObjects = [directories objectForKey:directoryName];
- for (NSDictionary* objectData in directoryObjects)
- {
- NSString* objectName = [objectData objectForKey:kTKDataObjectNameKey];
- NSString* objectPath = [documentationFilesInfoProvider outputObjectFilenameForObject:objectData];
-
- NSXMLElement* objectElement = [NSXMLNode elementWithName:@"Node"];
- [directorySubnodesElement addChild:objectElement];
- NSXMLElement* objectNameElement = [NSXMLNode elementWithName:@"Name" stringValue:objectName];
- [objectElement addChild:objectNameElement];
- NSXMLElement* objectPathElement = [NSXMLNode elementWithName:@"Path" stringValue:objectPath];
- [objectElement addChild:objectPathElement];
- }
- }
-
- // At the end of the directories create class hierarchy.
- NSXMLElement* hierarchyNodeElement = [NSXMLNode elementWithName:@"Node"];
- [hierarchyNodeElement addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"folder"]];
- [indexSubnodesElement addChild:hierarchyNodeElement];
- NSXMLElement* hierarchyNameElement = [NSXMLNode elementWithName:@"Name" stringValue:@"Class hierarchy"];
- [hierarchyNodeElement addChild:hierarchyNameElement];
- NSXMLElement* hierarchyPathElement = [NSXMLNode elementWithName:@"Path" stringValue:hierarchyFileName];
- [hierarchyNodeElement addChild:hierarchyPathElement];
- NSXMLElement* hierarchySubnodesElement = [NSXMLNode elementWithName:@"Subnodes"];
- [hierarchyNodeElement addChild:hierarchySubnodesElement];
-
- // Scan for all classes in the hierarchy.
- NSMutableDictionary* hierarchies = [database objectForKey:kTKDataMainHierarchiesKey];
- for (NSString* objectName in hierarchies)
- {
- NSDictionary* hierarchyData = [hierarchies objectForKey:objectName];
- [self addDocSetNodeToElement:hierarchySubnodesElement fromHierarchyData:hierarchyData];
- }
-
- // Save the document.
- NSError* error = nil;
- NSString* filename = [self.outputResourcesPath stringByAppendingPathComponent:@"Nodes.xml"];
- NSData* documentData = [document XMLDataWithOptions:NSXMLNodePrettyPrint];
- if (![documentData writeToFile:filename options:0 error:&error])
- {
- [loopAutoreleasePool drain];
- logError(@"Failed saving DocSet Nodes.xml to '%@'!", filename);
- [Systemator throwExceptionWithName:kTKConverterException basedOnError:error];
- }
-
- [loopAutoreleasePool drain];
- logInfo(@"Finished creating DocSet Nodes.xml file.");
-}
-
-//----------------------------------------------------------------------------------------
-- (void) createDocSetTokesFile
-{
- logNormal(@"Creating DocSet Tokens.xml file...");
- NSAutoreleasePool* loopAutoreleasePool = [[NSAutoreleasePool alloc] init];
- NSXMLDocument* document = [NSXMLDocument document];
-
- // Create the version and ecoding elements.
- [document setVersion:@"1.0"];
- [document setCharacterEncoding:@"UTF-8"];
-
- // Create the root <Tokens version="1.0"> element.
- NSXMLElement* rootElement = [NSXMLNode elementWithName:@"Tokens"];
- [rootElement addAttribute:[NSXMLNode attributeWithName:@"version" stringValue:@"1.0"]];
- [document setRootElement:rootElement];
-
- // The root <Tokens> element contains <File> elements representing individual
- // object files, so we can enumerate over the objects dictionary.
- NSDictionary* objects = [database objectForKey:kTKDataMainObjectsKey];
- for (NSString* objectName in objects)
- {
- // Get required object data.
- NSDictionary* objectData = [objects objectForKey:objectName];
- NSXMLDocument* objectDocument = [objectData objectForKey:kTKDataObjectMarkupKey];
- NSString* objectKind = [objectData objectForKey:kTKDataObjectKindKey];
- NSString* objectRelPath = [documentationFilesInfoProvider outputObjectFilenameForObject:objectData];
-
- // Prepare the object identifier.
- NSString* objectIdentifier = nil;
- if ([objectKind isEqualToString:@"category"])
- objectIdentifier = @"//apple_ref/occ/cat/";
- else if ([objectKind isEqualToString:@"protocol"])
- objectIdentifier = @"//apple_ref/occ/intf/";
- else
- objectIdentifier = @"//apple_ref/occ/cl/";
- objectIdentifier = [objectIdentifier stringByAppendingString:objectName];
-
- // Prepare the object filename.
- NSArray* fileNodes = [objectDocument nodesForXPath:@"object/file" error:nil];
- NSString* objectSrcFilename = ([fileNodes count] > 0) ? [[fileNodes objectAtIndex:0] stringValue] : @"";
-
- // Prepare the object description.
- NSArray* descriptionNodes = [objectDocument nodesForXPath:@"object/description" error:nil];
- NSString* objectDescription = ([descriptionNodes count] > 0) ? [[descriptionNodes objectAtIndex:0] stringValue] : @"";
-
- // Create the <File> element.
- NSXMLElement* fileElement = [NSXMLNode elementWithName:@"File"];
- [fileElement addAttribute:[NSXMLNode attributeWithName:@"path" stringValue:objectRelPath]];
- [rootElement addChild:fileElement];
-
- // Add the object <Token> element.
- NSXMLElement* objectTokenElement = [NSXMLNode elementWithName:@"Token"];
- [fileElement addChild:objectTokenElement];
- NSXMLElement* objectIdentElement = [NSXMLNode elementWithName:@"TokenIdentifier" stringValue:objectIdentifier];
- [objectTokenElement addChild:objectIdentElement];
- NSXMLElement* objectDeclaredInElement = [NSXMLNode elementWithName:@"DeclaredIn" stringValue:objectSrcFilename];
- [objectTokenElement addChild:objectDeclaredInElement];
- NSXMLElement* objectAbstractElement = [NSXMLNode elementWithName:@"Abstract" stringValue:objectDescription];
- [objectTokenElement addChild:objectAbstractElement];
-
- // Handle all object members.
- NSArray* memberNodes = [objectDocument nodesForXPath:@"//member" error:nil];
- for (NSXMLElement* memberNode in memberNodes)
- {
- // Prepare member name.
- NSArray* memberNameNodes = [memberNode nodesForXPath:@"name" error:nil];
- NSString* memberName = ([memberNameNodes count] > 0) ?
- [[memberNameNodes objectAtIndex:0] stringValue] : @"";
-
- // Prepare member file.
- NSArray* memberFileNodes = [memberNode nodesForXPath:@"file" error:nil];
- NSString* memberFile = ([memberFileNodes count] > 0) ?
- [[memberFileNodes objectAtIndex:0] stringValue] : @"";
-
- // Prepare member prototype.
- NSArray* memberPrototypeNodes = [memberNode nodesForXPath:@"prototype" error:nil];
- NSString* memberPrototype = ([memberPrototypeNodes count] > 0) ?
- [[memberPrototypeNodes objectAtIndex:0] stringValue] : @"";
-
- // Prepare member description.
- NSArray* memberDescNodes = [memberNode nodesForXPath:@"description" error:nil];
- NSString* memberDescription = ([memberDescNodes count] > 0) ?
- [[memberDescNodes objectAtIndex:0] stringValue] : @"";
-
- // Prepare member identifier.
- NSString* memberIdentifier = nil;
- if ([objectKind isEqualToString:@"class"])
- memberIdentifier = @"//apple_ref/occ/instm/";
- else
- memberIdentifier = @"//apple_ref/occ/intfm/";
- memberIdentifier = [memberIdentifier stringByAppendingFormat:@"%@/%@", objectName, memberName];
-
- // Add the member <Token> element.
- NSXMLElement* memberTokenElement = [NSXMLNode elementWithName:@"Token"];
- [fileElement addChild:memberTokenElement];
- NSXMLElement* memberIdentElement = [NSXMLNode elementWithName:@"TokenIdentifier" stringValue:memberIdentifier];
- [memberTokenElement addChild:memberIdentElement];
- NSXMLElement* memberAnchorElement = [NSXMLNode elementWithName:@"Anchor" stringValue:memberName];
- [memberTokenElement addChild:memberAnchorElement];
- NSXMLElement* memberDeclaredInElement = [NSXMLNode elementWithName:@"DeclaredIn" stringValue:memberFile];
- [memberTokenElement addChild:memberDeclaredInElement];
- NSXMLElement* memberDeclElement = [NSXMLNode elementWithName:@"Declaration" stringValue:memberPrototype];
- [memberTokenElement addChild:memberDeclElement];
- NSXMLElement* memberAbstractElement = [NSXMLNode elementWithName:@"Abstract" stringValue:memberDescription];
- [memberTokenElement addChild:memberAbstractElement];
- }
- }
-
- // Save the document.
- NSError* error = nil;
- NSString* filename = [self.outputResourcesPath stringByAppendingPathComponent:@"Tokens.xml"];
- NSData* documentData = [document XMLDataWithOptions:NSXMLNodePrettyPrint];
- if (![documentData writeToFile:filename options:0 error:&error])
- {
- [loopAutoreleasePool drain];
- logError(@"Failed saving DocSet Tokens.xml to '%@'!", filename);
- [Systemator throwExceptionWithName:kTKConverterException basedOnError:error];
- }
-
- [loopAutoreleasePool drain];
- logInfo(@"Finished creating DocSet Tokens.xml file.");
-}
-
-//----------------------------------------------------------------------------------------
-- (void) createDocSetBundle
-{
- logNormal(@"Creating DocSet bundle...");
-
- // First copy the info plist file into the contents output.
- NSString* plistDestPath = [self.outputContentsPath stringByAppendingPathComponent:@"Info.plist"];
- logVerbose(@"- Copying info plist file to '%@'...", plistDestPath);
- [Systemator copyItemAtPath:cmd.docsetSourcePlistPath toPath:plistDestPath];
-
- // Copy all html files to the bundle structure.
- logVerbose(@"- Copying documentation to '%@'...", self.outputDocumentsPath);
- [Systemator copyItemAtPath:[documentationFilesInfoProvider outputBasePath]
- toPath:self.outputDocumentsPath];
-
- // Index the documentation set.
- logVerbose(@"- Indexing DocSet...");
- [Systemator runTask:cmd.docsetutilCommandLine, @"index", [self outputBasePath], nil];
-
- // Copy the documentation set to the proper directory. First we need to remove
- // previous files otherwise copying will fail. Note that we need to create the
- // documentation set directory otherwise copying fails too...
- [Systemator createDirectory:cmd.docsetInstallPath];
- NSString* docsetInstallPath = [cmd.docsetInstallPath stringByAppendingPathComponent:cmd.docsetBundleID];
- logVerbose(@"- Copying DocSet bundle to '%@'...", docsetInstallPath);
- [Systemator copyItemAtPath:[self outputBasePath] toPath:docsetInstallPath];
-
- // Install the script to the Xcode.
- logVerbose(@"- Installing DocSet to Xcode...");
- NSMutableString* installCode = [NSMutableString string];
- [installCode appendString:@"tell application \"Xcode\"\n"];
- [installCode appendFormat:@"\tload documentation set with path \"%@\"\n", docsetInstallPath];
- [installCode appendString:@"end tell"];
-
- NSAppleScript* installScript = [[NSAppleScript alloc] initWithSource:installCode];
- NSDictionary* errorDict = nil;
- if (![installScript executeAndReturnError:&errorDict])
- {
- [installScript release];
- NSString* message = [NSString stringWithFormat:@"Installation of DocSet failed with message:\n'%@'!",
- [errorDict objectForKey:NSAppleScriptErrorMessage]];
- logError(@"Failed installing DocSet to Xcode documentation!");
- [Systemator throwExceptionWithName:kTKConverterException withDescription:message];
- return;
- }
- [installScript release];
-
- logInfo(@"Finished creating DocSet bundle.");
-}
-
-//----------------------------------------------------------------------------------------
-- (void) addDocSetNodeToElement:(NSXMLElement*) parent
- fromHierarchyData:(NSDictionary*) data
-{
- NSDictionary* children = [data objectForKey:kTKDataHierarchyChildrenKey];
- NSDictionary* objectData = [data objectForKey:kTKDataHierarchyObjectDataKey];
- NSString* objectName = [data objectForKey:kTKDataHierarchyObjectNameKey];
- NSString* objectPath = [objectData objectForKey:kTKDataObjectRelPathKey];
- objectPath = objectPath ?
- [documentationFilesInfoProvider outputObjectFilenameForObject:objectData] :
- [documentationFilesInfoProvider outputHierarchyFilename];
-
- // Create the main node that will represent the object.
- NSXMLElement* node = [NSXMLNode elementWithName:@"Node"];
- [parent addChild:node];
-
- // Create the name and path subnodes. Note that the path will be the main hierarchy
- // index file if the node is not documented.
- NSXMLElement* nameElement = [NSXMLNode elementWithName:@"Name" stringValue:objectName];
- [node addChild:nameElement];
- NSXMLElement* pathElement = [NSXMLNode elementWithName:@"Path" stringValue:objectPath];
- [node addChild:pathElement];
-
- // If there are children, set the node type to folder and add subnodes.
- if ([children count] > 0)
- {
- [node addAttribute:[NSXMLNode attributeWithName:@"type" stringValue:@"folder"]];
-
- NSXMLElement* subnodesElement = [NSXMLNode elementWithName:@"Subnodes"];
- [node addChild:subnodesElement];
-
- for (NSString* childName in children)
- {
- NSDictionary* childHierarchyData = [children objectForKey:childName];
- [self addDocSetNodeToElement:subnodesElement fromHierarchyData:childHierarchyData];
- }
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Properties
-//////////////////////////////////////////////////////////////////////////////////////////
-
-@synthesize documentationFilesInfoProvider;
-
-@end
View
1,510 Doxyfile
@@ -1,1510 +0,0 @@
-# Doxyfile 1.5.8
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = "appledoc"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = "/Users/tomaz/Documents/Temporary/Xcode/Build products/Help/appledoc"
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
-# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
-# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene,
-# Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it parses.
-# With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this tag.
-# The format is ext=language, where ext is a file extension, and language is one of
-# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
-# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
-# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
-# use: inc=Fortran f=C
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.