[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision)
From: |
Kazunobu Kuriyama |
Subject: |
NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision) |
Date: |
Mon, 19 Jan 2004 22:13:14 +0900 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 |
Attached is a list of the files found in -core that contain the
implementation of -initWithCoder:/-encodeWithCoder.
The data were taken from the current CVS repository several hours ago.
Because the data were collected using regular expressions, it is
possible for some of the data to be bogus; however, the results seem
to be correct at large (I hope).
Hopefully, this gives a rough estimation of the time-cosuming part of
the cost for accomplishing the keyed coding support.
The format of the list is
$1: $2 $3:[ $2 $3: ...] $4:
where
$1 -- file name
$2 -- line number at which the implementation of $4 begins
$3 -- line number at which the implementation of $4 ends
$4 -- method name
The following are some statistics derived from the list.
Total number of the decode and encode methods = 238
Total number of the lines of the code = 4738
Average number of the lines of the code = 19.9076
The average number may be misleading because the distribution is not
Gaussian (Obvious). The distribution is as follows:
---------+--------------
Range | # of methods
---------+--------------
0-- 9 | 104 ( 43.7 %)
10-- 19 | 70 ( 73.1 %)
20-- 29 | 21 ( 81.9 %)
30-- 39 | 12 ( 87.0 %)
40-- 49 | 11 ( 91.6 %)
50-- 59 | 5 ( 93.7 %)
60-- 69 | 3 ( 95.0 %)
70-- 79 | 2 ( 95.8 %)
80-- 89 | 3 ( 97.1 %)
90-- 99 | 2 ( 97.9 %)
100--109 | 0 ( 97.9 %)
110--119 | 1 ( 98.3 %)
120--129 | 2 ( 99.2 %)
130--139 | 0 ( 99.2 %)
140--149 | 0 ( 99.2 %)
150--159 | 0 ( 99.2 %)
160--169 | 1 ( 99.6 %)
170--179 | 1 (100.0 %)
---------+--------------
This table shows that, broadly speaking, the modification is really
time-consuming but relatively straight-forward, up to 90% of all
the methods in question.
- Kazunobu Kuriyama
--------
Kazunobu Kuriyama wrote:
Fred Kiefer wrote:
Richard Frith-Macdonald wrote:
Yes ... I think that the text-property-list encoded format of a
keyed archive finally makes reverse engineering of archived objects
a practical possibility (not to imply that it would be quick or easy).
I had a look at writing a keyed archiver several months back, and it
did not look *too* bad ... but I was having some trouble figuring
out exactly what the algorithm for generating the property list
should be. Perhaps I can find time to get back to it ... sounds
like it might move up the priority list if someone is willing to do
the donkey-work of updating all the ancoding/decoding methods of the
base/gui objects using it.
Last night I had my first chance to look at a key/value encoded nib
and that did look rather readable. SO if you need somebody to help
you I am ready to take up some tasks.
Fred
To initialize this sub-project, it would be helpful if we have a list
of classes which have their own
implementation of -initWithCoder:/-encodeWithCoder. If you think it
would be, too, let me know.
I'll make it.
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://mail.gnu.org/mailman/listinfo/discuss-gnustep
base/Source/Additions/GSXML.m: 3870 3876: -initWithCoder:
base/Source/GSArray.m: 179 196: -initWithCoder:
base/Source/GSArray.m: 167 177: -encodeWithCoder:
base/Source/GSAttributedString.m: 225 233: -initWithCoder:
base/Source/GSAttributedString.m: 213 217: -encodeWithCoder:
base/Source/GSCountedSet.m: 184 205: -initWithCoder:
base/Source/GSCountedSet.m: 150 170: -encodeWithCoder:
base/Source/GSDictionary.m: 126 146: -initWithCoder:
base/Source/GSDictionary.m: 103 119: -encodeWithCoder:
base/Source/GSSet.m: 188 206: -initWithCoder:
base/Source/GSSet.m: 166 181: -encodeWithCoder:
base/Source/GSString.m: 3958 3983: -initWithCoder:
base/Source/GSString.m: 2013 2023: -encodeWithCoder:
base/Source/GSTemplateValue.m: 254 265: -encodeWithCoder:
base/Source/GSValue.m: 244 261: -encodeWithCoder:
base/Source/NSArray.m: 553 580: -initWithCoder:
base/Source/NSArray.m: 354 371: -encodeWithCoder:
base/Source/NSAttributedString.m: 158 202: -initWithCoder:
base/Source/NSAttributedString.m: 140 156: -encodeWithCoder:
base/Source/NSBitmapCharSet.m: 71 78: -initWithCoder:
base/Source/NSBitmapCharSet.m: 66 69: -encodeWithCoder:
base/Source/NSCalendarDate.m: 409 416: -initWithCoder:
base/Source/NSCalendarDate.m: 401 407: -encodeWithCoder:
base/Source/NSCharacterSet.m: 352 356: -initWithCoder:
base/Source/NSCharacterSet.m: 347 350: -encodeWithCoder:
base/Source/NSConcreteNumber.m: 613 617: -initWithCoder:
base/Source/NSConcreteNumber.m: 600 606: -encodeWithCoder:
base/Source/NSConnection.m: 3536 3539: -encodeWithCoder:
base/Source/NSCountedSet.m: 124 160: -initWithCoder:
base/Source/NSCountedSet.m: 167 180: -encodeWithCoder:
base/Source/NSData.m: 1359 1368: -initWithCoder:
base/Source/NSData.m: 1354 1357: -encodeWithCoder:
base/Source/NSDate.m: 1054 1075: -initWithCoder:
base/Source/NSDate.m: 1047 1052: -encodeWithCoder:
base/Source/NSDateFormatter.m: 101 105: -initWithCoder:
base/Source/NSDateFormatter.m: 73 76: -encodeWithCoder:
base/Source/NSDictionary.m: 204 228: -initWithCoder:
base/Source/NSDictionary.m: 177 202: -encodeWithCoder:
base/Source/NSDistantObject.m: 543 549: -initWithCoder:
base/Source/NSDistantObject.m: 404 523: -encodeWithCoder:
base/Source/NSException.m: 300 306: -initWithCoder:
base/Source/NSException.m: 293 298: -encodeWithCoder:
base/Source/NSFormatter.m: 62 66: -initWithCoder:
base/Source/NSFormatter.m: 49 52: -encodeWithCoder:
base/Source/NSHost.m: 476 493: -initWithCoder:
base/Source/NSHost.m: 457 474: -encodeWithCoder:
base/Source/NSInvocation.m: 668 714: -initWithCoder:
base/Source/NSInvocation.m: 621 666: -encodeWithCoder:
base/Source/NSNotification.m: 161 177: -initWithCoder:
base/Source/NSNotification.m: 149 159: -encodeWithCoder:
base/Source/NSNull.m: 86 89: -initWithCoder:
base/Source/NSNull.m: 82 84: -encodeWithCoder:
base/Source/NSNumber.m: 2362 2403: -initWithCoder:
base/Source/NSNumber.m: 2354 2360: -encodeWithCoder:
base/Source/NSNumberFormatter.m: 193 216: -initWithCoder:
base/Source/NSNumberFormatter.m: 115 133: -encodeWithCoder:
base/Source/NSObject.m: 1940 1943: -initWithCoder:
base/Source/NSObject.m: 1930 1933: -encodeWithCoder:
base/Source/NSPort.m: 103 113: -initWithCoder:
base/Source/NSPort.m: 92 95: -encodeWithCoder:
base/Source/NSSet.m: 151 189: -initWithCoder:
base/Source/NSSet.m: 138 149: -encodeWithCoder:
base/Source/NSString.m: 3881 3956: -initWithCoder:
base/Source/NSString.m: 3860 3879: -encodeWithCoder:
base/Source/NSTimeZone.m: 709 715: -initWithCoder:
base/Source/NSTimeZone.m: 491 494: -encodeWithCoder:
base/Source/NSURL.m: 998 1009: -initWithCoder:
base/Source/NSURL.m: 987 991: -encodeWithCoder:
base/Source/NSValue.m: 391 568: -initWithCoder:
base/Source/NSValue.m: 366 387: -encodeWithCoder:
base/Testing/fref.m: 53 60: -initWithCoder:
base/Testing/fref.m: 45 51: -encodeWithCoder:
gui/Source/GSHbox.m: 167 173: -initWithCoder:
gui/Source/GSHbox.m: 160 165: -encodeWithCoder:
gui/Source/GSNibCompatibility.m: 98 104: -initWithCoder:
gui/Source/GSNibCompatibility.m: 106 112: -encodeWithCoder:
gui/Source/GSNibTemplates.m: 296 307: -initWithCoder:
gui/Source/GSNibTemplates.m: 280 284: -encodeWithCoder:
gui/Source/GSTable.m: 751 839: -initWithCoder:
gui/Source/GSTable.m: 720 749: -encodeWithCoder:
gui/Source/GSTextStorage.m: 190 198: -initWithCoder:
gui/Source/GSTextStorage.m: 178 182: -encodeWithCoder:
gui/Source/GSTrackingRect.m: 126 136: -initWithCoder:
gui/Source/GSTrackingRect.m: 116 124: -encodeWithCoder:
gui/Source/GSVbox.m: 170 176: -initWithCoder:
gui/Source/GSVbox.m: 163 168: -encodeWithCoder:
gui/Source/NSActionCell.m: 326 337: -initWithCoder:
gui/Source/NSActionCell.m: 316 324: -encodeWithCoder:
gui/Source/NSAffineTransform.m: 363 373: -initWithCoder:
gui/Source/NSAffineTransform.m: 375 383: -encodeWithCoder:
gui/Source/NSApplication.m: 2760 2773: -initWithCoder:
gui/Source/NSApplication.m: 2751 2758: -encodeWithCoder:
gui/Source/NSBezierPath.m: 1370 1421: -initWithCoder:
gui/Source/NSBezierPath.m: 1327 1368: -encodeWithCoder:
gui/Source/NSBitmapImageRep.m: 955 962: -initWithCoder:
gui/Source/NSBitmapImageRep.m: 947 953: -encodeWithCoder:
gui/Source/NSBox.m: 407 438: -initWithCoder:
gui/Source/NSBox.m: 395 405: -encodeWithCoder:
gui/Source/NSBrowser.m: 163 179: -initWithCoder:
gui/Source/NSBrowser.m: 152 161: -encodeWithCoder:
gui/Source/NSBrowserCell.m: 330 342: -initWithCoder:
gui/Source/NSBrowserCell.m: 318 328: -encodeWithCoder:
gui/Source/NSBundleAdditions.m: 79 85: -initWithCoder:
gui/Source/NSBundleAdditions.m: 68 73: -encodeWithCoder:
gui/Source/NSButtonCell.m: 1129 1149: -initWithCoder:
gui/Source/NSButtonCell.m: 1107 1127: -encodeWithCoder:
gui/Source/NSCachedImageRep.m: 157 164: -initWithCoder:
gui/Source/NSCachedImageRep.m: 150 155: -encodeWithCoder:
gui/Source/NSCell.m: 1981 2056: -initWithCoder:
gui/Source/NSCell.m: 1918 1979: -encodeWithCoder:
gui/Source/NSClipView.m: 719 741: -initWithCoder:
gui/Source/NSClipView.m: 709 717: -encodeWithCoder:
gui/Source/NSColor.m: 1045 1168: -initWithCoder:
gui/Source/NSColor.m: 1040 1043: -encodeWithCoder:
gui/Source/NSColorList.m: 435 442: -initWithCoder:
gui/Source/NSColorList.m: 428 433: -encodeWithCoder:
gui/Source/NSColorPanel.m: 629 634: -initWithCoder:
gui/Source/NSColorPanel.m: 624 627: -encodeWithCoder:
gui/Source/NSColorWell.m: 229 245: -initWithCoder:
gui/Source/NSColorWell.m: 219 227: -encodeWithCoder:
gui/Source/NSComboBoxCell.m: 943 966: -initWithCoder:
gui/Source/NSComboBoxCell.m: 924 941: -encodeWithCoder:
gui/Source/NSControl.m: 642 651: -initWithCoder:
gui/Source/NSControl.m: 633 640: -encodeWithCoder:
gui/Source/NSCursor.m: 372 381: -initWithCoder:
gui/Source/NSCursor.m: 363 370: -encodeWithCoder:
gui/Source/NSCustomImageRep.m: 77 84: -initWithCoder:
gui/Source/NSCustomImageRep.m: 69 75: -encodeWithCoder:
gui/Source/NSDataLink.m: 188 191: -initWithCoder:
gui/Source/NSDataLink.m: 184 186: -encodeWithCoder:
gui/Source/NSDataLinkManager.m: 264 267: -initWithCoder:
gui/Source/NSDataLinkManager.m: 260 262: -encodeWithCoder:
gui/Source/NSDataLinkPanel.m: 189 194: -initWithCoder:
gui/Source/NSDataLinkPanel.m: 184 187: -encodeWithCoder:
gui/Source/NSDrawer.m: 297 301: -initWithCoder:
gui/Source/NSDrawer.m: 292 295: -encodeWithCoder:
gui/Source/NSEPSImageRep.m: 135 142: -initWithCoder:
gui/Source/NSEPSImageRep.m: 126 133: -encodeWithCoder:
gui/Source/NSEvent.m: 765 822: -initWithCoder:
gui/Source/NSEvent.m: 690 743: -encodeWithCoder:
gui/Source/NSFileWrapper.m: 589 636: -initWithCoder:
gui/Source/NSFileWrapper.m: 579 587: -encodeWithCoder:
gui/Source/NSFont.m: 979 1097: -initWithCoder:
gui/Source/NSFont.m: 963 977: -encodeWithCoder:
gui/Source/NSFontPanel.m: 475 484: -initWithCoder:
gui/Source/NSFontPanel.m: 466 473: -encodeWithCoder:
gui/Source/NSForm.m: 319 324: -initWithCoder:
gui/Source/NSForm.m: 314 317: -encodeWithCoder:
gui/Source/NSFormCell.m: 363 375: -initWithCoder:
gui/Source/NSFormCell.m: 351 361: -encodeWithCoder:
gui/Source/NSHelpPanel.m: 133 138: -initWithCoder:
gui/Source/NSHelpPanel.m: 128 131: -encodeWithCoder:
gui/Source/NSImage.m: 1212 1257: -initWithCoder:
gui/Source/NSImage.m: 1151 1210: -encodeWithCoder:
gui/Source/NSImageCell.m: 375 384: -initWithCoder:
gui/Source/NSImageCell.m: 365 373: -encodeWithCoder:
gui/Source/NSImageRep.m: 506 516: -initWithCoder:
gui/Source/NSImageRep.m: 495 504: -encodeWithCoder:
gui/Source/NSImageView.m: 276 285: -initWithCoder:
gui/Source/NSImageView.m: 269 274: -encodeWithCoder:
gui/Source/NSMatrix.m: 2470 2553: -initWithCoder:
gui/Source/NSMatrix.m: 2435 2468: -encodeWithCoder:
gui/Source/NSMenu.m: 1070 1105: -initWithCoder:
gui/Source/NSMenu.m: 1063 1068: -encodeWithCoder:
gui/Source/NSMenuItem.m: 457 501: -initWithCoder:
gui/Source/NSMenuItem.m: 437 455: -encodeWithCoder:
gui/Source/NSMenuItemCell.m: 643 658: -initWithCoder:
gui/Source/NSMenuItemCell.m: 636 641: -encodeWithCoder:
gui/Source/NSMenuView.m: 1356 1374: -initWithCoder:
gui/Source/NSMenuView.m: 1345 1354: -encodeWithCoder:
gui/Source/NSOpenPanel.m: 587 595: -initWithCoder:
gui/Source/NSOpenPanel.m: 579 585: -encodeWithCoder:
gui/Source/NSOutlineView.m: 905 927: -initWithCoder:
gui/Source/NSOutlineView.m: 894 903: -encodeWithCoder:
gui/Source/NSPanel.m: 179 192: -initWithCoder:
gui/Source/NSPanel.m: 166 177: -encodeWithCoder:
gui/Source/NSParagraphStyle.m: 288 337: -initWithCoder:
gui/Source/NSParagraphStyle.m: 339 381: -encodeWithCoder:
gui/Source/NSPasteboard.m: 633 655: -initWithCoder:
gui/Source/NSPasteboard.m: 616 631: -encodeWithCoder:
gui/Source/NSPopUpButtonCell.m: 813 865: -initWithCoder:
gui/Source/NSPopUpButtonCell.m: 794 811: -encodeWithCoder:
gui/Source/NSPrintInfo.m: 365 369: -initWithCoder:
gui/Source/NSPrintInfo.m: 360 363: -encodeWithCoder:
gui/Source/NSPrinter.m: 842 862: -initWithCoder:
gui/Source/NSPrinter.m: 822 840: -encodeWithCoder:
gui/Source/NSProgressIndicator.m: 303 316: -initWithCoder:
gui/Source/NSProgressIndicator.m: 290 301: -encodeWithCoder:
gui/Source/NSResponder.m: 346 356: -initWithCoder:
gui/Source/NSResponder.m: 339 344: -encodeWithCoder:
gui/Source/NSRulerMarker.m: 546 557: -initWithCoder:
gui/Source/NSRulerMarker.m: 535 544: -encodeWithCoder:
gui/Source/NSRulerView.m: 866 870: -initWithCoder:
gui/Source/NSRulerView.m: 860 864: -encodeWithCoder:
gui/Source/NSSavePanel.m: 1165 1170: -initWithCoder:
gui/Source/NSSavePanel.m: 1172 1175: -encodeWithCoder:
gui/Source/NSScrollView.m: 1238 1327: -initWithCoder:
gui/Source/NSScrollView.m: 1200 1236: -encodeWithCoder:
gui/Source/NSScroller.m: 152 187: -initWithCoder:
gui/Source/NSScroller.m: 141 150: -encodeWithCoder:
gui/Source/NSSecureTextField.m: 130 136: -initWithCoder:
gui/Source/NSSecureTextField.m: 138 142: -encodeWithCoder:
gui/Source/NSSelection.m: 222 259: -initWithCoder:
gui/Source/NSSelection.m: 212 220: -encodeWithCoder:
gui/Source/NSSliderCell.m: 509 523: -initWithCoder:
gui/Source/NSSliderCell.m: 525 536: -encodeWithCoder:
gui/Source/NSSound.m: 695 725: -initWithCoder:
gui/Source/NSSound.m: 668 693: -encodeWithCoder:
gui/Source/NSSplitView.m: 898 929: -initWithCoder:
gui/Source/NSSplitView.m: 875 896: -encodeWithCoder:
gui/Source/NSStepper.m: 107 112: -initWithCoder:
gui/Source/NSStepper.m: 102 105: -encodeWithCoder:
gui/Source/NSStepperCell.m: 352 362: -initWithCoder:
gui/Source/NSStepperCell.m: 342 350: -encodeWithCoder:
gui/Source/NSTabView.m: 729 743: -initWithCoder:
gui/Source/NSTabView.m: 716 727: -encodeWithCoder:
gui/Source/NSTabViewItem.m: 221 232: -initWithCoder:
gui/Source/NSTabViewItem.m: 210 219: -encodeWithCoder:
gui/Source/NSTableColumn.m: 385 420: -initWithCoder:
gui/Source/NSTableColumn.m: 371 383: -encodeWithCoder:
gui/Source/NSTableHeaderView.m: 870 877: -initWithCoder:
gui/Source/NSTableHeaderView.m: 860 868: -encodeWithCoder:
gui/Source/NSTableView.m: 5940 6101: -initWithCoder:
gui/Source/NSTableView.m: 5910 5938: -encodeWithCoder:
gui/Source/NSTextAttachment.m: 330 338: -initWithCoder:
gui/Source/NSTextAttachment.m: 324 328: -encodeWithCoder:
gui/Source/NSTextField.m: 632 641: -initWithCoder:
gui/Source/NSTextField.m: 624 630: -encodeWithCoder:
gui/Source/NSTextFieldCell.m: 189 201: -initWithCoder:
gui/Source/NSTextFieldCell.m: 178 187: -encodeWithCoder:
gui/Source/NSTextView.m: 599 695: -initWithCoder:
gui/Source/NSTextView.m: 551 597: -encodeWithCoder:
gui/Source/NSView.m: 3620 3688: -initWithCoder:
gui/Source/NSView.m: 3601 3618: -encodeWithCoder:
gui/Source/NSWindow.m: 3988 4067: -initWithCoder:
gui/Source/NSWindow.m: 3943 3986: -encodeWithCoder:
gui/Source/NSWindowController.m: 465 468: -initWithCoder:
gui/Source/NSWindowController.m: 470 475: -encodeWithCoder:
- GModel decision, Gregory John Casamento, 2004/01/09
- Re: GModel decision, thisguyisi, 2004/01/12
- Re: GModel decision, Chad Hardin, 2004/01/12
- Re: GModel decision, Gregory John Casamento, 2004/01/12
- Re: GModel decision, Fred Kiefer, 2004/01/13
- Re: GModel decision, Richard Frith-Macdonald, 2004/01/14
- Re: GModel decision, Fred Kiefer, 2004/01/14
- Re: GModel decision, Gregory John Casamento, 2004/01/14
- Re: GModel decision, Kazunobu Kuriyama, 2004/01/16
- NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision),
Kazunobu Kuriyama <=
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Richard Frith-Macdonald, 2004/01/19
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Gregory John Casamento, 2004/01/19
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Richard Frith-Macdonald, 2004/01/20
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Kazunobu Kuriyama, 2004/01/21
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Alexander Malmberg, 2004/01/19
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Ken Ferry, 2004/01/19
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Ken Ferry, 2004/01/20
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Richard Frith-Macdonald, 2004/01/20
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Gregory John Casamento, 2004/01/20
- Re: NSKeyedArchiver/NSKeyedUnarchiver (was Re: GModel decision), Richard Frith-Macdonald, 2004/01/21