XMLBasedOutputGenerator class reference

OutputGenerator : NSObject
XMLBasedOutputGenerator.h
XMLBasedOutputGenerator.m
XMLBasedOutputGenerator+GeneralParsingAPI.h
XMLBasedOutputGenerator+HierarchyParsingAPI.h
XMLBasedOutputGenerator+HierarchySubclassAPI.h
XMLBasedOutputGenerator+IndexParsingAPI.h
XMLBasedOutputGenerator+IndexSubclassAPI.h
XMLBasedOutputGenerator+ObjectParsingAPI.h
XMLBasedOutputGenerator+ObjectSubclassAPI.h

Overview

Defines the basics for a concrete OutputGenerator which is based on the output produces by XMLOutputGenerator.

The main responsibility of this class is to hide the underlying XML handling from the subclasses. Instead it delegates parsing of the underlying data by sending the subclass messages for each detected data and by providing several utility methods that can be used to extract the data from the arguments. This unifies parsing for all subclasses and allows one-point handling for each different value, so if XML structure changes one day, there should be very small ammount of work for subclasses.

Each concrete subclass can convert three types of files - index, hierarchy and object files. The subclass can only override the methods for generating output that makes sense for the implemented output type. The XMLBasedOutputGenerator overrides the -[OutputGenerator generateSpecificOutput] in which it delegates the concrete output generation through the following messages:

However the subclass should not override these, but instead override all associated append______ methods (see the documentation for above mentioned methods for details). The main responsibility of these entry points is to setup data and invoke parsing of the associated XML structure which ends in append______ being sent. The subclass should override these and handle the data as needed. To extract the usable information from each append method, extract______ messages can be sent to the receiver. Additionaly, subclasses should also handle the rest of the OutputGenerator tasks such as creation and removal of output directories etc.

Tasks

Properties

Generation entry points

XMLBasedOutputGenerator()

XMLBasedOutputGenerator(GeneralParsingAPI)

XMLBasedOutputGenerator(HierarchyParsingAPI)

XMLBasedOutputGenerator(HierarchySubclassAPI)

XMLBasedOutputGenerator(IndexParsingAPI)

XMLBasedOutputGenerator(IndexSubclassAPI)

XMLBasedOutputGenerator(ObjectParsingAPI)

XMLBasedOutputGenerator(ObjectSubclassAPI)

Instance methods

generateOutputForObject:

Generates the output data for the given object data from the main database.

- (void)generateOutputForObject:(NSDictionary *) data
Parameters
data

The object NSDictionary from the main database.

Exceptions
NSException

Thrown if the given data is nil or generation fails.

Discussion

This message is sent from -[OutputGenerator generateSpecificOutput] after the passed object data is stored in the class properties. The concrete subclasses that require full control over the generated data, can override this method and return the desired output. If overriden, the subclass can get the XML document through the objectMarkup property.

By default, this will send several higher level messages which can be overriden instead. This is the recommended way of handling the output generation. The messages are sent in the following order:

Note that only a subset of above messages may be sent for a particular object, depending on the object data. Messages marked with * are optional, while messages marked with ** may additionaly be sent multiple times, for each corresponding item once.

After generation finishes, the corresponding file is saved to the proper location.

See also
Declared in
XMLBasedOutputGenerator.h

generateOutputForIndex

Generates the output data for the main index.

- (void)generateOutputForIndex
Exceptions
NSException

Thrown if the generation fails.

Discussion

This message is sent from -[OutputGenerator generateSpecificOutput] after the objects generation finishes. The concrete subclasses that require full control over the generated data, can override this method and return the desired output. If overriden, the subclass can get the clean index XML data through the indexMarkup property.

By default, this will send several higher level messages which can be overriden instead. This is the recommended way of handling the output generation. The messages are sent in the following order:

Note that only a subset of above messages may be sent for a particular object, depending on the object data. Messages marked with * are optional, while messages marked with ** may additionaly be sent multiple times, for each corresponding item once.

After generation finishes, the corresponding file is saved to the proper location.

See also
Declared in
XMLBasedOutputGenerator.h

generateOutputForHierarchy

Generates the output data from the data contained in the class properties.

- (void)generateOutputForHierarchy
Exceptions
NSException

Thrown if the given data or saving to file fails.

Discussion

This message is sent from -[OutputGenerator generateSpecificOutput] after the objects and index generation finishes. The concrete subclasses that require full control over the generated data, can override this method and return the desired output. If overriden, the subclass can get the clean hierarchy XML through the hierarchyMarkup property.

By default, this will send several higher level messages which can be overriden instead. This is the recommended way of handling the output generation. The messages are sent in the following order:

Note that only a subset of above messages may be sent for a particular object, depending on the object data. Messages marked with * are optional, while messages marked with ** may additionaly be sent multiple times, for each corresponding item once.

Important: Since objects hierarchy is tree-like structure with multiple levels, subclass should be able to have full control of when the children of a particular item are handled. The base class only automates the root objects notifications, while the subclass is responsible for sending - generateHierarchyGroupChildrenToData:forItem: from within it's - appendHierarchyGroupItemToData:fromItem:index: override in order to trigger the parsing of the children (if there are some). This deviates somehow from the rest of the output generation types. This actually starts recursive loop between - generateHierarchyGroupChildrenToData:forItem: and - appendHierarchyGroupItemToData:fromItem:index:, however do not fear, since the base class method will automatically stop when no more children are detected.

See also
Declared in
XMLBasedOutputGenerator.h

generateObjectInfoSectionToData:

Generates the object info section if necessary.

- (void)generateObjectInfoSectionToData:(NSMutableData *) data
Parameters
data

The NSMutableData to append to.

Exceptions
NSException

Thrown if generation fails.

Discussion

From here the following messages are sent to the subclass:

See also
Declared in
XMLBasedOutputGenerator.m

generateObjectInfoSectionToData:fromNodes:index:type:

Generates the given object info section if necessary.

- (void)generateObjectInfoSectionToData:(NSMutableData *) data fromNodes:(NSArray *) nodes index:(int *) index type:(int) type
Parameters
data

The NSMutableData to append to.

nodes

The array of NSXMLElement instances to append to.

index

Pointer to zero based index of the section item. The method will increment if the given nodes is not empty.

type

Type of the section item.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is sent from - generateObjectInfoSectionToData: for each info section item. From here the following message is sent to the subclass.

The message is only send if the given nodes array is not empty. The type parameter can be one of the following:

See also
Declared in
XMLBasedOutputGenerator.m

generateObjectOverviewSectionToData:

Generates the object overview data if necessary.

- (void)generateObjectOverviewSectionToData:(NSMutableData *) data
Parameters
data

The NSMutableData to append to.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is where the following messages are sent to the subclass:

See also
Declared in
XMLBasedOutputGenerator.m

generateObjectTasksSectionToData:

Generates the tasks section data if necessary.

- (void)generateObjectTasksSectionToData:(NSMutableData *) data
Parameters
data

The NSMutableData to append to.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is where the following messages are sent to the subclass:

See also
Declared in
XMLBasedOutputGenerator.m

generateObjectMembersSectionToData:

Generates the main members documentation section if necessary.

- (void)generateObjectMembersSectionToData:(NSMutableData *) data
Parameters
data

The NSMutableData to append to.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is where the following messages are sent to the subclass:

See also
Declared in
XMLBasedOutputGenerator.m

generateObjectMemberSectionToData:fromNodes:type:

Generates the given main members documentation section.

- (void)generateObjectMemberSectionToData:(NSMutableData *) data fromNodes:(NSArray *) nodes type:(int) type
Parameters
data

The NSMutableData to append to.

nodes

The array of NSXMLElement instances representing individual members.

type

The type of the instances.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is sent from - generateObjectMembersSectionToData: for each group of members that has at least one documented entry. This is where the following messages are sent to the subclass:

The type parameter can be one of the following:

See also
Declared in
XMLBasedOutputGenerator.m

generateIndexGroupSectionsToData:

Generates the index groups documentation sections.

- (void)generateIndexGroupSectionsToData:(NSMutableData *) data
Parameters
data

The NSMutableData to append to.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is sent from - generateIndexGroupSectionsToData:. It collects the group data and then sends - generateIndexGroupSectionToData:fromNodes:type: for each detected group.

See also
Declared in
XMLBasedOutputGenerator.m

generateIndexGroupSectionToData:fromNodes:type:

Generates the given main members documentation section.

- (void)generateIndexGroupSectionToData:(NSMutableData *) data fromNodes:(NSArray *) nodes type:(int) type
Parameters
data

The NSMutableData to append to.

nodes

The array of NSXMLElement instances representing individual members.

type

The type of the instances.

Exceptions
NSException

Thrown if generation fails.

Discussion

This is sent from - generateIndexGroupSectionsToData: for each group that has at least one member. This is where the following messages are sent to the subclass:

The type parameter can be one of the following:

See also
Declared in
XMLBasedOutputGenerator.m

markupByConvertingPlaceholdersInTemplate:

Converts all common placeholders in the given clean XML.

- (NSXMLDocument *)markupByConvertingPlaceholdersInTemplate:(NSXMLDocument *) document
Parameters
document

The original clean XML.

Exceptions
NSException

Thrown if convertion fails.

Return value

Returns new autoreleased NSXMLDocument with all common placeholders replaced.

Discussion

The method eventually returns new NSXMLDocument instance which can be used for output generation.

Declared in
XMLBasedOutputGenerator.m

extractBriefDescriptionFromItem:

Extracts the first brief description paragraph from the given description item.

- (NSString *)extractBriefDescriptionFromItem:(id) item
Parameters
item

The description item which brief description to return.

Return value

Returns the first brief description paragraph text or nil if not found.

Discussion

This will return only the first paragraph value from the given item if it exists. It is useful for generating short descriptions for example.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractBriefDescriptionsFromItem:

Extracts the brief description paragraphs from the given description item.

- (NSArray *)extractBriefDescriptionsFromItem:(id) item
Parameters
item

The description item which brief description paragraphs to return.

Return value

Returns the brief item paragraphs or nil if brief is empty.

Discussion

Note that this method assumes there can only be one brief description per a description item passed to the method. Subclasses can use extractParagraphText: to get the actual text of individual paragraphs.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractDetailDescriptionsFromItem:

Extracts the detailed description paragraphs from the given description item.

- (NSArray *)extractDetailDescriptionsFromItem:(id) item
Parameters
item

The description item which detailed description paragraphs to return.

Return value

Returns the detailed node paragraphs or nil if details are empty.

Discussion

Note that this method assumes there can only be one detailed description per a description item passed to the method. Subclasses can use extractParagraphText: to get the actual text of individual paragraphs.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractDescriptionsFromItem:

Extracts the paragraphs from the given item.

- (NSArray *)extractDescriptionsFromItem:(id) item
Parameters
item

The item which paragraphs contents to extract.

Return value

Returns the array of paragraphs or nil if no paragraph is found.

Discussion

This method can be used for any item which contains the list of paragraphs. Internally it is also used to extract the paragraphs in the - extractBriefDescriptionsFromItem: and - extractDetailDescriptionsFromItem:.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractDescriptionType:

Extracts the type of the given description item.

- (int)extractDescriptionType:(id) item
Parameters
item

The item which type to return.

Exceptions
Thrown

if the given item is not recognised.

Return value

Returns the type of the given item.

Discussion

This method can be used to get the information about the type of the given description item extracted through one of the following methods: - extractBriefDescriptionsFromItem:, - extractDetailDescriptionsFromItem:, - extractDescriptionsFromItem:.

Possible return values are:

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractDescriptionReference:

Extracts the description reference from the given description item.

- (NSString *)extractDescriptionReference:(id) description
Parameters
description

The kTKDescriptionReferenceStart description item to extract from.

Return value

Returns the reference value of the given item.

Discussion

This method can be used to get the information about the reference link from description item extracted through one of the following methods: - extractBriefDescriptionsFromItem:, - extractDetailDescriptionsFromItem:, - extractDescriptionsFromItem:.

Important: This only returns valid values for description types of kTKDescriptionReferenceStart. It returns nil for all other description types.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractDescriptionText:

Extracts the description text from the given description item.

- (NSString *)extractDescriptionText:(id) item
Parameters
item

The kTKDescriptionText description item to extract from.

Return value

Returns the text value of the given item.

Discussion

This method can be used to get the information about the actual text from description item extracted through one of the following methods: - extractBriefDescriptionsFromItem:, - extractDetailDescriptionsFromItem:, - extractDescriptionsFromItem:.

Important: This only returns valid values for description types of kTKDescriptionText. It returns invalid values for all other description types.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

isInterObjectReference:

Determines if the given reference is inter-object or member reference.

- (BOOL)isInterObjectReference:(NSString *) reference
Parameters
reference

The reference to check.

Return value

Returns YES if the given reference represents an inter-object reference, NO otherwise. Also returns NO if mil is passed as the parameter.

Discussion

This method can be used to determine the type of the given reference. It should be passed the reference obtained from the - extractDescriptionReference: method. If mil is passed, NO is returned.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

isDescriptionUsed:

Determines if at least one of the given brief or detailed paragraphs is used or not.

- (BOOL)isDescriptionUsed:(NSArray *) nodes
Parameters
nodes

The array returned from description parsing methods.

Return value

Returns YES if at least one paragraph contains some text.

Discussion

If at least one paragraph from the given array contains some tekst, the method assumes it is not empty. Note that all empty paragraphs are already removed from the cleaned source in previous steps, but some may still be present...

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractSubitemFromItem:withName:

Extracts the given sub item from the given item.

- (id)extractSubitemFromItem:(id) item withName:(NSString *) name
Parameters
item

The item to extract from.

name

The name of the subitem to extract.

Return value

Returns the given subitem or nil if doesn't exist.

Discussion

Note that this method always returns the first subitem if more than one exists.

Important: This method is here because other methods from the category need it. It should not be used by the subclasses and should be regarded as internal!

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractSubitemsFromItem:appendToArray:closeContainers:

Extracts all sub items from the given item.

- (void)extractSubitemsFromItem:(id) item appendToArray:(NSMutableArray *) array closeContainers:(BOOL) close
Parameters
item

The item which subitems to extract.

array

The array to which to append the items.

close

If YES, all container sub-items are "closed", otherwise not.

Discussion

Note that this returns the whole hierarchy of sub-items in proper order. Optionally, this can also close all container sub-items.

Important: This method is here because other methods from the category need it. It should not be used by the subclasses and should be regarded as internal!

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

appendLine:toData:

Appends the given string to the end of the given data, followed by a new line.

- (void)appendLine:(NSString *) string toData:(NSMutableData *) data
Parameters
string

The string to append before the new line.

data

The data to append to.

Exceptions
NSException

Thrown if appending fails.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

appendString:toData:

Appends the given string to the end of the given data.

- (void)appendString:(NSString *) string toData:(NSMutableData *) data
Parameters
string

The string to append.

data

The data to append to.

Exceptions
NSException

Thrown if appending fails.

See also
Declared in
XMLBasedOutputGenerator+GeneralParsingAPI.h

extractHierarchyGroupItemRef:

Extracts the hierarchy group item reference value for the given item.

- (NSString *)extractHierarchyGroupItemRef:(id) item
Parameters
item

The item which reference to return.

Return value

Returns the item reference or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+HierarchyParsingAPI.h

extractHierarchyGroupItemName:

Extracts the hierarchy group item name for the given item.

- (NSString *)extractHierarchyGroupItemName:(id) item
Parameters
item

The item which value to return.

Return value

Returns the item value or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+HierarchyParsingAPI.h

extractHierarchyGroupItemChildren:

Extracts the hierarchy group item children for the given item.

- (NSArray *)extractHierarchyGroupItemChildren:(id) item
Parameters
item

The item which children to return.

Return value

Returns a NSArray containing all children of the item or nil if item is leaf.

See also
Declared in
XMLBasedOutputGenerator+HierarchyParsingAPI.h

appendHierarchyHeaderToData:

Appends any header text before the actual generation starts.

- (void)appendHierarchyHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForHierarchy as the first message. It gives subclasses a chance to append data to the output before the actual output generation starts. After this message is sent, the rest of the messages are followed and as the last one, - appendHierarchyFooterToData: is sent.

See also
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

appendHierarchyFooterToData:

Appends any footer text after output generation ends.

- (void)appendHierarchyFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForHierarchy as the last message. It gives subclasses a chance to append data to the output after the rest of the output is generated. This is ussually the place to "close" open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

appendHierarchyGroupHeaderToData:

Appends any hierarchy group header text before the actual group items generation starts.

- (void)appendHierarchyGroupHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForHierarchy just before hierarchy group items are generated. It gives subclasses a chance to append data to the output before the generation for group items starts. After this message is sent, at least one - appendHierarchyGroupItemToData:fromItem:index: message is sent and then - appendHierarchyGroupFooterToData: is sent at the end.

See also
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

appendHierarchyGroupFooterToData:

Appends any hierarchy group footer text after the group items generation ends.

- (void)appendHierarchyGroupFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForHierarchy as the last group generation message. It gives subclasses a chance to append data to the output after the generation for hierarchy group ends. This is ussually the place to "close" open tags or similar.

Note that this message is sent after all children of all the group items are processed so that the subclass can safely assume the whole group is processed well.

See also
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

appendHierarchyGroupItemToData:fromItem:index:

Appends the given hierarchy group item data.

- (void)appendHierarchyGroupItemToData:(NSMutableData *) data fromItem:(id) item index:(int) index
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The data item describing the given member.

index

Zero based index of the member within the group.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from XMLBasedOutputGenerator::outputDataForHierarchy for each group member. The subclass should append the data for the given item. The subclass can get more information about the member by using the hierarchy member data methods from the XMLBasedOutputGenerator(HierarchyParsingAPI) category.

See also
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

generateHierarchyGroupChildrenToData:forItem:

Generates the given hierarchy item's children documentation .

- (void)generateHierarchyGroupChildrenToData:(NSMutableData *) data forItem:(id) item
Parameters
data

The NSMutableData to append to.

item

The item for which to generate children output.

Exceptions
NSException

Thrown if generation fails.

Discussion

This should be sent by the subclass from it's - appendHierarchyGroupItemToData:fromItem:index: override at the point where all children should be processed. It will check if any children are defined for the given item and will in turn send the subclass all hierarchy group appending methods: - appendHierarchyGroupHeaderToData:, - appendHierarchyGroupItemToData:fromItem:index: and - appendHierarchyGroupFooterToData: for all children, including their children and so on recursively until no more children are found.

Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

extractIndexGroupItemRef:

Extracts the index group item reference value for the given item.

- (NSString *)extractIndexGroupItemRef:(id) item
Parameters
item

The item which reference to return.

Return value

Returns the item reference or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+IndexParsingAPI.h

extractIndexGroupItemName:

Extracts the index group item name for the given item.

- (NSString *)extractIndexGroupItemName:(id) item
Parameters
item

The item which value to return.

Return value

Returns the item value or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+IndexParsingAPI.h

appendIndexHeaderToData:

Appends any header text before the actual generation starts.

- (void)appendIndexHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForIndex as the first message. It gives subclasses a chance to append data to the output before the actual output generation starts. After this message is sent, the rest of the messages are followed and as the last one, - appendIndexFooterToData: is sent.

See also
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

appendIndexFooterToData:

Appends any footer text after output generation ends.

- (void)appendIndexFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForIndex as the last message. It gives subclasses a chance to append data to the output after the rest of the output is generated. This is ussually the place to "close" open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

appendIndexGroupHeaderToData:type:

Appends any index group header text before the actual group items generation starts.

- (void)appendIndexGroupHeaderToData:(NSMutableData *) data type:(int) type
Parameters
data

The data to append to. This is guaranteed to be non mil.

type

The type of the index group.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForIndex just before index group items are generated. It gives subclasses a chance to append data to the output before the generation for group items starts. After this message is sent, at least one - appendIndexGroupItemToData:fromItem:index:type: message is sent and then - appendIndexGroupFooterToData:type: is sent at the end.

The type identifies the type of the index group and can be one of the following:

See also
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

appendIndexGroupFooterToData:type:

Appends any index group footer text after the group items generation ends.

- (void)appendIndexGroupFooterToData:(NSMutableData *) data type:(int) type
Parameters
data

The data to append to. This is guaranteed to be non mil.

type

The type of the index group.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the XMLBasedOutputGenerator::outputDataForIndex as the last group generation message. It gives subclasses a chance to append data to the output after the generation for index group ends. This is ussually the place to "close" open tags or similar.

The type identifies the type of the index group and can be one of the following:

See also
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

appendIndexGroupItemToData:fromItem:index:type:

Appends the given index group item data.

- (void)appendIndexGroupItemToData:(NSMutableData *) data fromItem:(id) item index:(int) index type:(int) type
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The data item describing the given member.

index

Zero based index of the member within the group.

type

The type of the index group.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from XMLBasedOutputGenerator::outputDataForIndex for each group member. The subclass should append the data for the given item. The subclass can get more information about the member by using the index member data methods from the XMLBasedOutputGenerator(IndexParsingAPI) category.

The type identifies the type of the index group and can be one of the following:

See also
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

extractObjectInfoItemRef:

Extracts the object info item reference value for the given item.

- (NSString *)extractObjectInfoItemRef:(id) item
Parameters
item

The item which reference to te return.

Return value

Returns the item reference or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectInfoItemValue:

Extracts the object info item value for the given item.

- (NSString *)extractObjectInfoItemValue:(id) item
Parameters
item

The item which value to te return.

Return value

Returns the item value or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectTaskName:

Extracts the task name from the given task item.

- (NSString *)extractObjectTaskName:(id) item
Parameters
item

The task item which name to return.

Return value

Returns the section name or nil if not found.

Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberType:

Extracts the member type fromt he given item.

- (int)extractObjectMemberType:(id) item
Parameters
item

The member item which type to return.

Return value

Returns the member kind.

Discussion

The result is one of the following:

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberName:

Extracts the member name from the given member item.

- (NSString *)extractObjectMemberName:(id) item
Parameters
item

The member item which name to return.

Return value

Returns the member name or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberSelector:

Extracts the member selector name from the given member item.

- (NSString *)extractObjectMemberSelector:(id) item
Parameters
item

The member item which selector name to return.

Return value

Returns the member selector name or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberFile:

Extracts the member file name from the given member item.

- (NSString *)extractObjectMemberFile:(id) item
Parameters
item

The member item which file name to return.

Return value

Returns the member file name or nil if not found.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberPrototypeItem:

Extracts the member prototype item from the given member item.

- (id)extractObjectMemberPrototypeItem:(id) item
Parameters
item

The member item which prototype item to return.

Return value

Returns the member prototype item or nil if not found.

Discussion

The returned item can be used by - extractObjectMemberPrototypeSubitems: to get individual components. Then use - extractObjectMemberPrototypeItemType: and - extractObjectMemberPrototypeItemValue: to get data for the individual components.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberDescriptionItem:

Extracts the member description item from the given member item.

- (id)extractObjectMemberDescriptionItem:(id) item
Parameters
item

The member item which description item to return.

Return value

Returns the member description item or nil if not found.

Discussion

The returned item can be used by - extractBriefDescriptionFromItem:, - extractBriefDescriptionsFromItem: and - extractDetailDescriptionsFromItem: to get individual description components.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberSectionItems:type:

Extracts the member section items from the given member item.

- (NSArray *)extractObjectMemberSectionItems:(id) item type:(int) type
Parameters
item

The member item which parameters to return.

type

The type of section to return.

Return value

Returns the array of items representing the member's parameters or nil if not found.

Discussion

The type can be one of the following:

Since all sections have the same layout, all section helpers can be used. The section helpers are:

Passing a type value other than one of the described here-in, may result in unpredictable behavior.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberReturnItem:

Extracts the member return item contents fromthe given member item.

- (id)extractObjectMemberReturnItem:(id) item
Parameters
item

The member item which return description to get.

Exceptions
NSException

Thrown if extraction fails.

Return value

Returns the return item of the given member or nil if not found.

Discussion

The returned value contains the same layout as any other brief or detailed description item, so it can be treated in the same way, including all formatting and other specifics such as links generation. In most cases, at last one paragraph subitem is contained as the child item.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberWarningItem:

Extracts the member warning item contents fromthe given member item.

- (id)extractObjectMemberWarningItem:(id) item
Parameters
item

The member item which warning description to get.

Exceptions
NSException

Thrown if extraction fails.

Return value

Returns the warning item of the given member or nil if not found.

Discussion

The returned value contains the same layout as any other brief or detailed description item, so it can be treated in the same way, including all formatting and other specifics such as links generation. In most cases, at last one paragraph subitem is contained as the child item.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberBugItem:

Extracts the member bug item contents from the given member item.

- (id)extractObjectMemberBugItem:(id) item
Parameters
item

The member item which bug description to get.

Exceptions
NSException

Thrown if extraction fails.

Return value

Returns the bug item of the given member or nil if not found.

Discussion

The returned value contains the same layout as any other brief or detailed description item, so it can be treated in the same way, including all formatting and other specifics such as links generation. In most cases, at last one paragraph subitem is contained as the child item.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberSeeAlsoItems:

Extracts the member see also subitems from the given member item.

- (NSArray *)extractObjectMemberSeeAlsoItems:(id) item
Parameters
item

The member item which see also list to get.

Exceptions
NSException

Thrown if extraction fails.

Return value

Returns the array of items representing individual see also items or nil if not found.

Discussion

The returned array contains all see also items. Each item returned in the resulting array contains the same layout as any other brief or detailed description item, so it can be treated in the same way, including all formatting and other specifics such as links generation.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberPrototypeSubitems:

Extracts the member prototype subitems from the given member item.

- (NSArray *)extractObjectMemberPrototypeSubitems:(id) item
Parameters
item

The member prototype item which subitems to return.

Return value

Returns the array of prototype contents or nil if no content is found.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberPrototypeItemType:

Extracts the given member prototype item type.

- (int)extractObjectMemberPrototypeItemType:(id) item
Parameters
item

The prototype item to check.

Return value

Returns the type of the given item.

Discussion

This can be used over the items of the array returned from - extractObjectMemberPrototypeSubitems:. Possible return values are:

To get the actual value, use - extractObjectMemberPrototypeItemValue: passing the result of this method as the type parameter.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectMemberPrototypeItemValue:

Extracts the given prototype component value from the given prototype item.

- (NSString *)extractObjectMemberPrototypeItemValue:(id) item
Parameters
item

The prototype item to check.

Return value

Returns the string value representation of the given prototype item.

Discussion

This can be used over the items of the array returned from - extractObjectMemberPrototypeSubitems:.

See also
Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectParameterName:

Extracts the parameter name from the given parameter item.

- (NSString *)extractObjectParameterName:(id) item
Parameters
item

The parameter item which name to return.

Return value

Returns the parameter name or nil if not found.

Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

extractObjectParameterDescriptionItem:

Extracts the parameter description item from the given parameter item.

- (id)extractObjectParameterDescriptionItem:(id) item
Parameters
item

The parameter item which description item to return.

Return value

Returns the parameter description item or nil if not found.

Discussion

The returned item can be used by - extractBriefDescriptionFromItem:, - extractBriefDescriptionsFromItem: and - extractDetailDescriptionsFromItem: to get individual description components.

Declared in
XMLBasedOutputGenerator+ObjectParsingAPI.h

appendObjectHeaderToData:

Appends any header text before the actual generation starts.

- (void)appendObjectHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: as the first message. It gives subclasses a chance to append data to the output before the actual output generation starts. After this message is sent, the rest of the messages are followed and as the last one, - appendObjectFooterToData: is sent.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectFooterToData:

Appends any footer text after output generation ends.

- (void)appendObjectFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: as the last message. It gives subclasses a chance to append data to the output after the rest of the output is generated. This is ussually the place to "close" open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectInfoHeaderToData:

Appends any object info header text before the actual generation starts.

- (void)appendObjectInfoHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: just before object info items are generated. It gives subclasses a chance to append data to the output before the generation for secion items starts. After this message is sent, at least one - appendObjectInfoItemToData:fromItems:index:type: message is sent and then - appendObjectInfoHeaderToData: is sent at the end.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectInfoFooterToData:

Appends any object info footer text after the object info items generation ends.

- (void)appendObjectInfoFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: as the last info generation message. It gives subclasses a chance to append data to the output after the info items generation is finished. This is ussually the place to "close" open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectInfoItemToData:fromItems:index:type:

Appends the given object info item data.

- (void)appendObjectInfoItemToData:(NSMutableData *) data fromItems:(NSArray *) items index:(int) index type:(int) type
Parameters
data

The data to append to. This is guaranteed to be non mil.

items

The array of info items instances describing individual items.

index

Zero based index of the item within the info object info.

type

The type of the item.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from - generateOutputForObject: for each applicable object info item type. The subclass should append the data for the given item. The subclass can get more information about the object info item by investigating the given array which contains objects that can be used to query additional data for individual item.

The type identifies the type of the info item and can be one of the following:

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectOverviewToData:fromItem:

Appends object overview description.

- (void)appendObjectOverviewToData:(NSMutableData *) data fromItem:(id) item
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The item that contains the brief and detailed description.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from - generateOutputForObject: if the object has brief and or detailed documentation assigned. It gives subclasses a chance to append object overview from the gathered documentation. The given item contains brief and detailed object description and can be treated as any other description item.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectTasksHeaderToData:

Appends any tasks header before the actual tasks generation starts.

- (void)appendObjectTasksHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: if the object has at least one task defined. It gives subclasses a chance to append data to the output before any individual task handling is started. After this message is sent, each individual task is handled and when all tasks are done, - appendObjectTasksFooterToData: is sent.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectTasksFooterToData:

Appends any tasks footer after sections generation ends.

- (void)appendObjectTasksFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: after all tasks have been processed. It gives subclasses a chance to append data to the output at that point. This is ussually the place to "close" tasks open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectTaskHeaderToData:fromItem:index:

Appends an individual task header before the task members generation starts.

- (void)appendObjectTaskHeaderToData:(NSMutableData *) data fromItem:(id) item index:(int) index
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The item that contains the task description.

index

Zero based index of the task.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: for each task which has at least one member. It gives subclasses a chance to append data to the output before member handling for the given task starts.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectTaskFooterToData:fromItem:index:

Appends an individual task footer after the task members generation ends.

- (void)appendObjectTaskFooterToData:(NSMutableData *) data fromItem:(id) item index:(int) index
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The item that contains the task description.

index

Zero based index of the task.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: after all task members have been processed. It gives subclasses a chance to append data to the output at that point. This is ussually the place to "close" tasks open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectTaskMemberToData:fromItem:index:

Appends a task member data.

- (void)appendObjectTaskMemberToData:(NSMutableData *) data fromItem:(id) item index:(int) index
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The item that contains the task member description.

index

Zero based index of the member within the task.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from the - generateOutputForObject: for each task member (class or instance method or property). Subclasses should append any desired data for the given member.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectMembersHeaderToData:

Appends any main members documentation header before the actual member generation starts.

- (void)appendObjectMembersHeaderToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: if the object has at least one main member group defined. It gives subclasses a chance to append data to the output before any individual member handling is started. After this message is sent, each individual member group is handled and when all members are done, - appendObjectMembersFooterToData: is sent.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectMembersFooterToData:

Appends any main members documentation footer after members generation ends.

- (void)appendObjectMembersFooterToData:(NSMutableData *) data
Parameters
data

The data to append to. This is guaranteed to be non mil.

Exceptions
NSException

Thrown if appending fails.

Discussion

The message is sent from the - generateOutputForObject: after all member groups have been processed. It gives subclasses a chance to append data to the output at that point. This is ussually the place to "close" sections open tags or similar.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectMemberGroupHeaderToData:type:

Appends member group header data.

- (void)appendObjectMemberGroupHeaderToData:(NSMutableData *) data type:(int) type
Parameters
data

The data to append to. This is guaranteed to be non mil.

type

The type of the group that is being described.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from - generateOutputForObject: for each main member documentation group. The group is specified with the type parameter and can be one of the following:

Subclasses should append any desired data for the given group type. The message is only sent if at least one member of the given type is documented for the object. After this message one or more - appendObjectMemberToData:fromItem:index: messages are sent, one for each documented member of the given group and after all members output is generated, - appendObjectMemberGroupHeaderToData:type: is sent.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectMemberGroupFooterToData:type:

Appends member group footer data.

- (void)appendObjectMemberGroupFooterToData:(NSMutableData *) data type:(int) type
Parameters
data

The data to append to. This is guaranteed to be non mil.

type

The type of the group that is being described.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from - generateOutputForObject: for each main member documentation group. The group is specified by the type parameter and can be one of the following:

Subclasses should append any desired data for the given group type. In most cases this is the place to close any open tags or similar. The message is only sent if the corresponding - appendObjectMemberGroupHeaderToData:type: was sent.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

appendObjectMemberToData:fromItem:index:

Appends individual member full documentation data.

- (void)appendObjectMemberToData:(NSMutableData *) data fromItem:(id) item index:(int) index
Parameters
data

The data to append to. This is guaranteed to be non mil.

item

The item that describes the member data.

index

Zero based index of the member within the group.

Exceptions
NSException

Thrown if appending fails.

Discussion

This message is sent from - generateOutputForObject: for each documented member. Subclasses should output the full documentation for the given member.

See also
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

Properties

projectName

Returns the project name from command line.

@property NSString *projectName
Declared in
XMLBasedOutputGenerator.h

lastUpdated

Returns the last updated date formatted in standard way.

@property NSString *lastUpdated
Discussion

Note that this always return formatted current system time.

Declared in
XMLBasedOutputGenerator.h

outputFileWasCreated

Returns the status of output files generation.

@property BOOL outputFileWasCreated
Discussion

This returns YES if at least one output file was generated within the last generation run (i.e. between the -[OutputGenerator outputGenerationStarting] and -[OutputGenerator outputGenerationFinished] messages).

Declared in
XMLBasedOutputGenerator.h

hierarchyTitle

Returns current hierarchy output title.

@property NSString *hierarchyTitle
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

hierarchyMarkup

Returns current hierarchy cleaned XML document.

@property NSXMLDocument *hierarchyMarkup
Declared in
XMLBasedOutputGenerator+HierarchySubclassAPI.h

indexTitle

Returns current index output title.

@property NSString *indexTitle
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

indexMarkup

Returns current index cleaned XML document.

@property NSXMLDocument *indexMarkup
Declared in
XMLBasedOutputGenerator+IndexSubclassAPI.h

objectTitle

Returns current object output title.

@property NSString *objectTitle
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

objectName

Returns current object name.

@property NSString *objectName
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

objectKind

Returns current object kind.

@property NSString *objectKind
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

objectClass

Returns the names of the class, the current object belongs to.

@property NSString *objectClass
Discussion

At the moment this is only applicable for categories.

Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

objectMarkup

Returns current object cleaned XML document.

@property NSXMLDocument *objectMarkup
Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

objectRelativeDir

Returns current object relative directory within the generated output.

@property NSString *objectRelativeDir
Discussion

This is only the directory and nothing else, in contrary to objectRelativePath which also returns the file name.

Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

objectRelativePath

Returns current object relative path within the generated output.

@property NSString *objectRelativePath
Discussion

This returns the directory and the object name without the extension (the extension should be specified by each concrete XMLBasedOutputGenerator class). See also objectRelativeDir.

Declared in
XMLBasedOutputGenerator+ObjectSubclassAPI.h

© 2008-2009 Tomaz Kragelj. All rights reserved. (Last updated: 2009-08-24)
Back to index / hierarchy.