NuGenerator
A code generator for Objective-C classes.
Superclass: NSObject
Declared in: nu/generate.nu
Given a list of instance variables and their types,
NuGenerator generates code for Objective-C classes. This
code includes variable declarations, accessors, and
encoding and decoding methods. Much of this capability
is available in Objective-C 2.0 using properties,
but it is provided here to show how easy it is to
use Nu to take direct control of the process.
Methods
| + |
(id) |
decodeVariable: |
(id) name |
|
withType: |
(id) type |
Generate code to decode instance variables during unarchiving.
in nu/generate.nu
| + |
(id) |
encodeVariable: |
(id) name |
|
withType: |
(id) type |
Generate code to encode instance variables during archiving.
in nu/generate.nu
| - |
(id) |
generateImplementations |
Generate class implementations; usually these are placed in source (.m) files.
in nu/generate.nu
| - |
(id) |
generateInterfaces |
Generate class interface descriptions; usually these are placed in header files.
in nu/generate.nu
| - |
(id) |
generateDeclarations |
Generate class forward declarations; usually these are placed in header files.
in nu/generate.nu
| - |
(id) |
generateEnumTypedefs |
Generate typedefs for enumerated types
in nu/generate.nu
| - |
(id) |
initWithDescription: |
(id) description |
Initialize a generator with a list that describes a set of classes to be generated.
in nu/generate.nu