Difference between revisions of "DevelopmentKit"

From GNUstepWiki
Jump to navigation Jump to search
Line 34: Line 34:
 
   notarchived    - ignore in archiving
 
   notarchived    - ignore in archiving
 
   object        - instance variable is an object (see below)
 
   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)
 
Class keywords (defaults for all instance variables)

Revision as of 22:41, 26 February 2005

Develompent Kit Framework is ObjectiveC/GNUstep framework for generating Objective C code based projects and sources from applications.

Features:

  • 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/

Browse CVS Tree

Author: Stefan Urbanek

Tools

dkautogen

Autogenerate ObjectiveC Interface and Implementation methods

Usage:

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

Known types

All standard C types including NSPoint, NSSize, NSRect and NSRange are treated as non-objects. By default only id and Class types are treated as objects.

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

Example:

   dkautogen -implementationTemplate MyTemplate.m SomeClass.h

Classes

  • DKBuildMessage
  • DKClass
  • DKFramework
  • DKFrameworkManager
  • DKMethod
  • DKObjectiveCParser
  • DKProjectBuilder
  • DKProject
  • DKSourceGenerator
  • DKTemplateMerger
  • DKVariable

DevelKit reuses class AGSParser from autogsdoc.