Indivo Framework (iOS)
An iOS framework for Apps connecting to Indivo server
 All Classes Functions Variables Properties Pages
Instance Methods | Class Methods | Properties | List of all members
INClassGenerator Class Reference

A class that can generate Objective-C classes from Indivo XML schemas. More...

#import <INClassGenerator.h>

Inherits NSObject, and <INSchemaParserDelegate>.

Instance Methods

(BOOL) - ignoresType:
 
(void) - runFrom:into:callback:
 Run all the XSD schemas we find. More...
 
- Instance Methods inherited from <INSchemaParserDelegate>
(NSString *) - schemaParser:classNameForType:effectiveType:
 
(void) - schemaParser:didParseClass:forName:superclass:forType:properties:
 
(NSString *) - schemaParser:existingClassNameForType:
 
(void) - schemaParser:isProcessingFileAtPath:
 
(void) - schemaParser:sendsMessage:ofType:
 

Class Methods

(NSString *) + applySubstitutions:toTemplate:
 This method applies substitutions found in a dictionary to a template. More...
 
(NSString *) + applyToBodyTemplate:
 
(NSString *) + applyToHeaderTemplate:
 

Properties

BOOL mayOverwriteExisting
 NO by default, if YES will overwrite existing classes. More...
 
NSUInteger numClassesGenerated
 
NSUInteger numClassesNotOverwritten
 
NSUInteger numSchemasParsed
 

Detailed Description

A class that can generate Objective-C classes from Indivo XML schemas.

Method Documentation

+ (NSString *) applySubstitutions: (NSDictionary *)  substitutions
toTemplate: (NSString *)  aTemplate 

This method applies substitutions found in a dictionary to a template.

It currently is very cheaply implemented using RegExes and only recognizes {% if VAR_NAME %} and {{ VAR_NAME }} and does not allow nesting.

+ (NSString *) applyToBodyTemplate: (NSDictionary *)  substitutions
+ (NSString *) applyToHeaderTemplate: (NSDictionary *)  substitutions
- (BOOL) ignoresType: (NSString *)  typeName
- (void) runFrom: (NSString *)  inputPath
into: (NSString *)  outDirectory
callback: (INCancelErrorBlock)  aCallback 

Run all the XSD schemas we find.

Schema files must have the .xsd extension.

Parameters
inputPathA path to a directory containing XSD files or a path to one XSD file. A directory will be recursively searched.
outDirectoryThe directory to write the class files to
aCallbackCompletion block

Property Documentation

- (BOOL) mayOverwriteExisting
readwritenonatomicassign

NO by default, if YES will overwrite existing classes.

- (NSUInteger) numClassesGenerated
readwritenonatomicassign
- (NSUInteger) numClassesNotOverwritten
readwritenonatomicassign
- (NSUInteger) numSchemasParsed
readwritenonatomicassign

The documentation for this class was generated from the following files: