- (void) encodeWithCoder: (NSCoder *) aCoder { // [super encodeWithCoder:] if you inherit from a class // that supports encoding. NSObject does not. // encoding a C type [aCoder encodeValueOfObjCType: @encode(int) at: &itemCount]; // encoding an array of C structs int i; for (i = 0; i < itemCount; i++) { [aCoder encodeValueOfObjCType: @encode(BWRawPathItem) at: &items[i]]; } // encoding an object [aCoder encodeObject: name]; } // encodeWithCoder