Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 438 lines (390 sloc) 22.004 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
//
// GBDocSetOutputGenerator.m
// appledoc
//
// Created by Tomaz Kragelj on 29.11.10.
// Copyright 2010 Gentle Bytes. All rights reserved.
//

#import "RegexKitLite.h"
#import "GRMustache.h"
#import "GBStore.h"
#import "GBApplicationSettingsProvider.h"
#import "GBTask.h"
#import "GBDataObjects.h"
#import "GBTemplateHandler.h"
#import "GBDocSetOutputGenerator.h"

@interface GBDocSetOutputGenerator ()

- (BOOL)copyOrMoveSourceFilesToDocuments:(NSError **)error;
- (BOOL)processInfoPlist:(NSError **)error;
- (BOOL)processNodesXml:(NSError **)error;
- (BOOL)processTokensXml:(NSError **)error;
- (BOOL)indexDocSet:(NSError **)error;
- (BOOL)removeTemporaryFiles:(NSError **)error;
- (BOOL)processTokensXmlForObjects:(NSArray *)objects type:(NSString *)type template:(NSString *)template index:(NSUInteger *)index error:(NSError **)error;
- (void)addTokensXmlModelObjectDataForObject:(GBModelBase *)object toData:(NSMutableDictionary *)data;
- (void)addTokensXmlModelObjectDataForPropertySetterAndGetter:(GBModelBase *)property withData:(NSDictionary *)data toArray:(NSMutableArray *)members;
- (void)initializeSimplifiedObjects;
- (NSArray *)simplifiedObjectsFromObjects:(NSArray *)objects value:(NSString *)value index:(NSUInteger *)index;
- (NSString *)tokenIdentifierForObject:(GBModelBase *)object;

@property (retain) NSArray *documents;
@property (retain) NSArray *classes;
@property (retain) NSArray *categories;
@property (retain) NSArray *protocols;
@property (readonly) NSMutableSet *temporaryFiles;

@end

#pragma mark -

@implementation GBDocSetOutputGenerator

#pragma Generation handling

- (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
NSParameterAssert(self.previousGenerator != nil);

// Prepare for run.
if (![super generateOutputWithStore:store error:error]) return NO;
[self.temporaryFiles removeAllObjects];
[self initializeSimplifiedObjects];

// Create documentation set from files generated by previous generator.
if (![self copyOrMoveSourceFilesToDocuments:error]) return NO;
if (![self processInfoPlist:error]) return NO;
if (![self processNodesXml:error]) return NO;
if (![self processTokensXml:error]) return NO;
if (![self indexDocSet:error]) return NO;
if (![self removeTemporaryFiles:error]) return NO;
return YES;
}

- (BOOL)copyOrMoveSourceFilesToDocuments:(NSError **)error {
GBLogInfo(@"Moving HTML files to DocSet bundle...");

// Prepare all paths. Note that we determine the exact subdirectory by searching for documents-template and using it's subdirectory as the guide. If documents template wasn't found, exit.
NSString *sourceFilesPath = [self.inputUserPath stringByStandardizingPath];
NSString *documentsPath = [self outputPathToTemplateEndingWith:@"documents-template"];
if (!documentsPath) {
if (error) *error = [NSError errorWithCode:GBErrorDocSetDocumentTemplateMissing description:@"Documents template is missing!" reason:@"documents-template file is required to determine location for Documents path in DocSet bundle!"];
GBLogWarn(@"Failed finding documents-template in '%@'!", self.templateUserPath);
return NO;
}

// Copy or move all files generated by previous generator to documents subfolder of docset structure.
if (![self copyOrMoveItemFromPath:sourceFilesPath toPath:documentsPath error:error]) {
GBLogWarn(@"Failed moving files from '%@' to '%@'!", self.previousGenerator.outputUserPath, documentsPath);
return NO;
}
return YES;
}

- (BOOL)processInfoPlist:(NSError **)error {
#define addVarUnlessEmpty(var,key) if ([var length] > 0) [vars setObject:var forKey:key]
GBLogInfo(@"Writting DocSet Info.plist...");
NSString *templateFilename = @"info-template.plist";
NSString *templatePath = [self templatePathForTemplateEndingWith:templateFilename];
if (!templatePath) {
if (error) *error = [NSError errorWithCode:GBErrorDocSetInfoPlistTemplateMissing description:@"Info.plist template is missing!" reason:@"info-template.plist file is required to specify information about DocSet!"];
GBLogWarn(@"Failed finding info-template.plist in '%@'!", self.templateUserPath);
return NO;
}

// Prepare template variables and replace all placeholders with actual values.
NSMutableDictionary *vars = [NSMutableDictionary dictionaryWithCapacity:20];
addVarUnlessEmpty(self.settings.docsetBundleIdentifier, @"bundleIdentifier");
addVarUnlessEmpty(self.settings.docsetBundleName, @"bundleName");
addVarUnlessEmpty(self.settings.projectVersion, @"bundleVersion");
addVarUnlessEmpty(self.settings.docsetCertificateIssuer, @"certificateIssuer");
addVarUnlessEmpty(self.settings.docsetCertificateSigner, @"certificateSigner");
addVarUnlessEmpty(self.settings.docsetDescription, @"description");
addVarUnlessEmpty(self.settings.docsetFallbackURL, @"fallbackURL");
addVarUnlessEmpty(self.settings.docsetFeedName, @"feedName");
addVarUnlessEmpty(self.settings.docsetFeedURL, @"feedURL");
addVarUnlessEmpty(self.settings.docsetMinimumXcodeVersion, @"minimumXcodeVersion");
addVarUnlessEmpty(self.settings.docsetPlatformFamily, @"platformFamily");
addVarUnlessEmpty(self.settings.docsetPublisherIdentifier, @"publisherIdentifier");
addVarUnlessEmpty(self.settings.docsetPublisherName, @"publisherName");
addVarUnlessEmpty(self.settings.docsetCopyrightMessage, @"copyrightMessage");
addVarUnlessEmpty(self.settings.dashDocsetPlatformFamily, @"dashPlatformFamily");

// Run the template and save the results as Info.plist.
GBTemplateHandler *handler = [self.templateFiles objectForKey:templatePath];
NSString *output = [handler renderObject:vars];
NSString *outputPath = [self outputPathToTemplateEndingWith:templateFilename];
NSString *filename = [outputPath stringByAppendingPathComponent:@"Info.plist"];
if (![self writeString:output toFile:[filename stringByStandardizingPath] error:error]) {
GBLogWarn(@"Failed writting Info.plist to '%@'!", filename);
return NO;
}
return YES;
}

- (BOOL)processNodesXml:(NSError **)error {
GBLogInfo(@"Writting DocSet Nodex.xml file...");
NSString *templateFilename = @"nodes-template.xml";
NSString *templatePath = [self templatePathForTemplateEndingWith:templateFilename];
if (!templatePath) {
if (error) *error = [NSError errorWithCode:GBErrorDocSetNodesTemplateMissing description:@"Nodes.xml template is missing!" reason:@"nodes-template.xml file is required to specify document structure for DocSet!"];
GBLogWarn(@"Failed finding nodes-template.xml in '%@'!", self.templateUserPath);
return NO;
}

// Prepare the variables for the template.
NSMutableDictionary *vars = [NSMutableDictionary dictionary];
[vars setObject:self.settings.projectName forKey:@"projectName"];
[vars setObject:@"index.html" forKey:@"indexFilename"];
[vars setObject:([self.documents count] > 0) ? [GRYes yes] : [GRNo no] forKey:@"hasDocs"];
[vars setObject:([self.classes count] > 0) ? [GRYes yes] : [GRNo no] forKey:@"hasClasses"];
[vars setObject:([self.categories count] > 0) ? [GRYes yes] : [GRNo no] forKey:@"hasCategories"];
[vars setObject:([self.protocols count] > 0) ? [GRYes yes] : [GRNo no] forKey:@"hasProtocols"];
[vars setObject:self.documents forKey:@"docs"];
[vars setObject:self.classes forKey:@"classes"];
[vars setObject:self.categories forKey:@"categories"];
[vars setObject:self.protocols forKey:@"protocols"];
[vars setObject:self.settings.stringTemplates forKey:@"strings"];

// Run the template and save the results.
GBTemplateHandler *handler = [self.templateFiles objectForKey:templatePath];
NSString *output = [handler renderObject:vars];
NSString *outputPath = [self outputPathToTemplateEndingWith:templateFilename];
NSString *filename = [outputPath stringByAppendingPathComponent:@"Nodes.xml"];
[self.temporaryFiles addObject:filename];
if (![self writeString:output toFile:[filename stringByStandardizingPath] error:error]) {
GBLogWarn(@"Failed writting Nodes.xml to '%@'!", filename);
return NO;
}
return YES;
}

- (BOOL)processTokensXml:(NSError **)error {
GBLogInfo(@"Writting DocSet Tokens.xml files...");

// Get the template and prepare single Tokens.xml file for each object.
NSString *templatePath = [self templatePathForTemplateEndingWith:@"tokens-template.xml"];
if (!templatePath) {
GBLogWarn(@"Didn't find tokens-template.xml in '%@', DocSet will not be indexed!", self.templateUserPath);
return YES;
}

// Write each object as a separate token file.
NSUInteger index = 1;
if (![self processTokensXmlForObjects:self.documents type:@"doc" template:templatePath index:&index error:error]) return NO;
if (![self processTokensXmlForObjects:self.classes type:@"cl" template:templatePath index:&index error:error]) return NO;
if (![self processTokensXmlForObjects:self.categories type:@"cat" template:templatePath index:&index error:error]) return NO;
if (![self processTokensXmlForObjects:self.protocols type:@"intf" template:templatePath index:&index error:error]) return NO;
return YES;
}

- (BOOL)indexDocSet:(NSError **)error {
GBLogInfo(@"Indexing DocSet...");
GBTask *task = [GBTask task];
task.reportIndividualLines = YES;
NSArray *args = [NSArray arrayWithObjects:@"index", [self.outputUserPath stringByStandardizingPath], nil];
BOOL result = [task runCommand:self.settings.docsetUtilPath arguments:args block:^(NSString *output, NSString *error) {
if (output) GBLogDebug(@"> %@", [output stringByTrimmingWhitespaceAndNewLine]);
if (error) GBLogError(@"!> %@", [error stringByTrimmingWhitespaceAndNewLine]);
}];
if (!result) {
if (self.settings.treatDocSetIndexingErrorsAsFatals) {
if (error) *error = [NSError errorWithCode:GBErrorDocSetUtilIndexingFailed description:@"docsetutil failed to index the documentation set!" reason:task.lastStandardError];
return NO;
} else {
GBLogWarn(@"docsetutil failed to index the documentation set, continuing with what was indexed...");
}
}
return YES;
}

- (BOOL)removeTemporaryFiles:(NSError **)error {
// We delete all registered temporary files and clear the list. If there are some problems, we simply log but always return YES - if these files remain, documentation set is still usable, so it's no point of aborting... Note that we keep all intermediate files if user has specified so.
if (self.settings.keepIntermediateFiles) return YES;
GBLogInfo(@"Removing temporary DocSet files...");
NSError *err = nil;
for (NSString *filename in self.temporaryFiles) {
GBLogDebug(@"Removing '%@'...", filename);
if (![self.fileManager removeItemAtPath:[filename stringByStandardizingPath] error:&err]) {
GBLogNSError(err, @"Failed removing temporary file '%@'!", filename);
}
}
return YES;
}

#pragma mark Helper methods

- (BOOL)processTokensXmlForObjects:(NSArray *)objects type:(NSString *)type template:(NSString *)template index:(NSUInteger *)index error:(NSError **)error {
// Prepare the output path and template handler then generate file for each object.
GBTemplateHandler *handler = [self.templateFiles objectForKey:template];
NSString *templateFilename = [template lastPathComponent];
NSString *outputPath = [self outputPathToTemplateEndingWith:templateFilename];
NSUInteger idx = *index;
for (NSMutableDictionary *simplifiedObjectData in objects) {
// Get the object's methods provider and prepare the array of all methods.
GBModelBase *topLevelObject = [simplifiedObjectData objectForKey:@"object"];
GBMethodsProvider *methodsProvider = [topLevelObject valueForKey:@"methods"];

// Prepare template variables for object. Note that we reuse the ID assigned while creating the data for Nodes.xml.
NSMutableDictionary *objectData = [NSMutableDictionary dictionaryWithCapacity:2];
[objectData setObject:[simplifiedObjectData objectForKey:@"id"] forKey:@"refid"];
[self addTokensXmlModelObjectDataForObject:topLevelObject toData:objectData];

// Prepare the list of all members.
NSMutableArray *membersData = [NSMutableArray arrayWithCapacity:[methodsProvider.methods count]];
for (GBMethodData *method in methodsProvider.methods) {
NSMutableDictionary *data = [NSMutableDictionary dictionaryWithCapacity:4];
[data setObject:[self.settings htmlReferenceNameForObject:method] forKey:@"anchor"];
[self addTokensXmlModelObjectDataForObject:method toData:data];
[self addTokensXmlModelObjectDataForPropertySetterAndGetter:method withData:data toArray:membersData];
[membersData addObject:data];
}

// Prepare the variables for the template.
NSMutableDictionary *vars = [NSMutableDictionary dictionary];
[vars setObject:[simplifiedObjectData objectForKey:@"path"] forKey:@"filePath"];
[vars setObject:objectData forKey:@"object"];
[vars setObject:membersData forKey:@"members"];

// Run the template and save the results.
NSString *output = [handler renderObject:vars];
NSString *indexName = [NSString stringWithFormat:@"Tokens%ld.xml", idx++];
NSString *filename = [outputPath stringByAppendingPathComponent:indexName];
[self.temporaryFiles addObject:filename];
if (![self writeString:output toFile:[filename stringByStandardizingPath] error:error]) {
GBLogWarn(@"Failed writting tokens file '%@'!", filename);
*index = idx;
return NO;
}
}
*index = idx;
return YES;
}

- (void)addTokensXmlModelObjectDataForObject:(GBModelBase *)object toData:(NSMutableDictionary *)data {
[data setObject:[self tokenIdentifierForObject:object] forKey:@"identifier"];
[data setObject:[[object.sourceInfosSortedByName objectAtIndex:0] filename] forKey:@"declaredin"];
if (object.comment) {
if (object.comment.hasShortDescription) {
GBCommentComponentsList *components = [GBCommentComponentsList componentsList];
[components registerComponent:object.comment.shortDescription];
[data setObject:components forKey:@"abstract"];
}
if ([object.comment.relatedItems.components count] > 0) {
NSMutableArray *related = [NSMutableArray arrayWithCapacity:[object.comment.relatedItems.components count]];
for (GBCommentComponent *crossref in object.comment.relatedItems.components) {
if (crossref.relatedItem) {
NSString *tokenIdentifier = [self tokenIdentifierForObject:crossref.relatedItem];
if (tokenIdentifier) [related addObject:tokenIdentifier];
}
}
if ([related count] > 0) {
[data setObject:[GRYes yes] forKey:@"hasRelatedTokens"];
[data setObject:related forKey:@"relatedTokens"];
}
}
}
if ([object isKindOfClass:[GBMethodData class]]) {
GBMethodData *method = (GBMethodData *)object;
[data setObject:method.formattedComponents forKey:@"formattedComponents"];
if (method.comment) {
if (method.comment.hasMethodParameters) {
NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:[method.comment.methodParameters count]];
for (GBCommentArgument *argument in method.comment.methodParameters) {
NSMutableDictionary *argData = [NSMutableDictionary dictionaryWithCapacity:2];
[argData setObject:argument.argumentName forKey:@"name"];
[argData setObject:argument.argumentDescription forKey:@"abstract"];
[arguments addObject:argData];
}
[data setObject:arguments forKey:@"parameters"];
[data setObject:[GRYes yes] forKey:@"hasParameters"];
}
if (method.comment.hasMethodResult) {
NSDictionary *resultData = [NSDictionary dictionaryWithObject:method.comment.methodResult forKey:@"abstract"];
[data setObject:resultData forKey:@"returnValue"];
}
if (method.comment.hasAvailability) {
NSDictionary *resultData = [NSDictionary dictionaryWithObject:method.comment.availability forKey:@"abstract"];
[data setObject:resultData forKey:@"availability"];
}
}
}
}

- (void)addTokensXmlModelObjectDataForPropertySetterAndGetter:(GBModelBase *)method withData:(NSDictionary *)data toArray:(NSMutableArray *)members {
// For all properties we need to add getters and setters to the doc set.
if (![method isKindOfClass:[GBMethodData class]]) return;
GBMethodData *property = (GBMethodData *)method;
if (!property.isProperty) return;

// Setter: returns void, has an argument of the same type as the property, use property's setterSelector as name and avoid duplication of the colon by trimming it. Copy source infos from property.
NSArray *setterResults = [NSArray arrayWithObjects:@"void", nil];
NSArray *setterTypes = [property methodResultTypes];
NSString *setterName = [property propertySetterSelector];
setterName = [setterName stringByTrimmingCharactersInSet:[NSCharacterSet punctuationCharacterSet]];
NSArray *setterArgs = [NSArray arrayWithObject:[GBMethodArgument methodArgumentWithName:setterName types:setterTypes var:@"val"]];
GBMethodData *setterMethod = [GBMethodData methodDataWithType:GBMethodTypeInstance result:setterResults arguments:setterArgs];
GBLogDebug(@"Adding setter method %@ for property: %@", setterMethod, property);
setterMethod.parentObject = property.parentObject;
setterMethod.comment = property.comment;
for (GBSourceInfo *info in property.sourceInfos) {
[setterMethod registerSourceInfo:info];
}

// Add Setter to XML and also copy anchor from property, override declaration with @property one.
NSMutableDictionary *setterData = [NSMutableDictionary dictionaryWithCapacity:4];
[setterData setObject:[self.settings htmlReferenceNameForObject:property] forKey:@"anchor"];
[self addTokensXmlModelObjectDataForObject:setterMethod toData:setterData];
[setterData setObject:[data objectForKey:@"formattedComponents"] forKey:@"formattedComponents"];
[members addObject:setterData];
}

- (NSString *)tokenIdentifierForObject:(GBModelBase *)object {
if (object.isTopLevelObject) {
// Class, category and protocol have different prefix, but are straighforward. Note that category has it's class name specified for object name!
if ([object isKindOfClass:[GBClassData class]]) {
NSString *objectName = [(GBClassData *)object nameOfClass];
return [NSString stringWithFormat:@"//apple_ref/occ/cl/%@", objectName];
} else if ([object isKindOfClass:[GBCategoryData class]]) {
NSString *objectName = [(GBCategoryData *)object idOfCategory];
return [NSString stringWithFormat:@"//apple_ref/occ/cat/%@", objectName];
} else if ([object isKindOfClass:[GBProtocolData class]]){
NSString *objectName = [(GBProtocolData *)object nameOfProtocol];
return [NSString stringWithFormat:@"//apple_ref/occ/intf/%@", objectName];
}
} else if ([object isKindOfClass:[GBDocumentData class]]){
        NSString *objectName = [(GBDocumentData *)object prettyNameOfDocument];
        return [NSString stringWithFormat:@"//apple_ref/occ/doc/%@", objectName];
    } else if (!object.isStaticDocument) {
// Members are slighly more complex - their identifier is different regarding to whether they are part of class or category/protocol. Then it depends on whether they are method or property. Finally their parent object (class/category/protocol) name (again class name for category) and selector should be added.
if (!object.parentObject) [NSException raise:@"Can't create token identifier for %@; object is not top level and has no parent assigned!", object];

// First handle parent related stuff.
GBModelBase *parent = object.parentObject;
NSString *objectName = nil;
NSString *objectID = nil;
if ([parent isKindOfClass:[GBClassData class]]) {
objectName = [(GBClassData *)parent nameOfClass];
objectID = ([(GBMethodData *)object methodType] == GBMethodTypeClass) ? @"cl" : @"inst";
} else if ([parent isKindOfClass:[GBCategoryData class]]) {
objectName = [(GBCategoryData *)parent idOfCategory];
objectID = @"intf";
} else {
objectName = [(GBProtocolData *)parent nameOfProtocol];
objectID = @"intf";
}

// Prepare the actual identifier based on method type.
GBMethodData *method = (GBMethodData *)object;
if (method.methodType == GBMethodTypeProperty)
return [NSString stringWithFormat:@"//apple_ref/occ/%@p/%@/%@", objectID, objectName, method.methodSelector];
else
return [NSString stringWithFormat:@"//apple_ref/occ/%@m/%@/%@", objectID, objectName, method.methodSelector];
}
return nil;
}

- (void)initializeSimplifiedObjects {
// Prepare flat list of objects for library nodes.
GBLogDebug(@"Initializing simplified object representations...");
NSUInteger index = 1;
self.documents = [self simplifiedObjectsFromObjects:[self.store documentsSortedByName] value:@"prettyNameOfDocument" index:&index];
self.classes = [self simplifiedObjectsFromObjects:[self.store classesSortedByName] value:@"nameOfClass" index:&index];
self.categories = [self simplifiedObjectsFromObjects:[self.store categoriesSortedByName] value:@"idOfCategory" index:&index];
self.protocols = [self simplifiedObjectsFromObjects:[self.store protocolsSortedByName] value:@"nameOfProtocol" index:&index];
}

- (NSArray *)simplifiedObjectsFromObjects:(NSArray *)objects value:(NSString *)value index:(NSUInteger *)index {
NSUInteger idx = *index;
NSMutableArray *result = [NSMutableArray arrayWithCapacity:[objects count]];
for (id object in objects) {
GBLogDebug(@"Initializing simplified representation of %@ with id %ld...", object, idx);
NSMutableDictionary *data = [NSMutableDictionary dictionaryWithCapacity:4];
[data setObject:object forKey:@"object"];
[data setObject:[NSString stringWithFormat:@"%ld", idx++] forKey:@"id"];
[data setObject:[object valueForKey:value] forKey:@"name"];
[data setObject:[self.settings htmlReferenceForObjectFromIndex:object] forKey:@"path"];
[result addObject:data];
}
*index = idx;
return result;
}

#pragma mark Overriden methods

- (NSString *)outputSubpath {
return @"docset";
}

#pragma mark Properties

- (NSString *)docsetInstallationPath {
return [self.settings.docsetInstallPath stringByAppendingPathComponent:self.settings.docsetBundleFilename];
}

- (NSMutableSet *)temporaryFiles {
static NSMutableSet *result = nil;
if (!result) result = [[NSMutableSet alloc] init];
return result;
}

@synthesize documents;
@synthesize classes;
@synthesize categories;
@synthesize protocols;

@end
Something went wrong with that request. Please try again.