- class compositing
- objective c source parsing and transforming into development objects (classes, methods, variables,...)
- source file generation using templates
- project building
Project Page: https://savannah.nongnu.org/projects/develkit/
Author: Stefan Urbanek
Autogenerate ObjectiveC Interface and Implementation methods
dkautogen file1.h file2.h ...
Type 'dkautogen help' for more information.
To each .h and corresponding .m file a category DKGenerated is appended. If there is already such category, then it is replaced.
Instance variable keywords
hidden - do not generate accessor methods exposed - expose accessor methods retained - object is retained notretained - object is NOT retained (weak reference) readonly - instance variable is read only (setter is not generated) notarchived - ignore in archiving object - instance variable is an object (see below) customaccess - do not generate implementation of accessor methods, generate interface only
Class keywords (defaults for all instance variables)
hidden - all ivars are hidden exposed - all ivars are exposed (accessors are generated) retained - all objects are retained notretained - objects are NOT retained readonly - all instance variable are read only objects - treat all unknown types as objects customarchive - do not generate archiving methods nosuperarchive - do not call archiving in superclass customdealloc - do not generate -dealloc method
Generated methods by default: accessors (getter and setter), dealloc methon, initWithCoder:, and encodeWithCoder
How to use
Attributes are written in same comments used for auto-documentation. They are read from comments after the LAST pipe '|' character in the comment and they should be separated by spaces. Example:
NSString *name; /** Object name | object readonly retained */
Class defaults are written immediately before @interface:
/** This is my class | nosuperarchive retained objects */ @interface MyClass : NSObject
Preferences (also usable as switches on commandline with '-' prefix):
interfaceTemplate - path to .h file template implementationTemplate - path to .m file template beginTag - tag used to mark beginning of generated code endTag - tag used to mark end of generated code
dkautogen -implementationTemplate MyTemplate.m SomeClass.h