Update of /cvsroot/foo/foo/libfoo/modules/orthodox
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15451
Modified Files:
FOOMFof.m
Log Message:
added archiving method
Index: FOOMFof.m
===================================================================
RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFof.m,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FOOMFof.m 16 Aug 2004 05:20:49 -0000 1.5
--- FOOMFof.m 17 Aug 2004 06:05:49 -0000 1.6
***************
*** 489,494 ****
--- 489,507 ----
- (void) encodeWithCoder: (NSCoder *)coder
{
+ double initPhase = _fof.inputs.phase;
+
[super encodeWithCoder: coder];
+ if ([coder allowsKeyedCoding])
+ {
+ [coder encodeDouble: _beginT forKey: @"FOOMFof:beginT"];
+ [coder encodeDouble: initPhase forKey: @"FOOMFof:initPhase"];
+ }
+ else
+ {
+ [coder encodeValueOfObjCType: @encode(double) at: &_beginT];
+ [coder encodeValueOfObjCType: @encode(double) at: &initPhase];
+ }
+
return;
}
***************
*** 497,502 ****
--- 510,537 ----
- (id) initWithCoder: (NSCoder *)coder
{
+ double initPhase;
+
self = [super initWithCoder: coder];
+ if ([coder allowsKeyedCoding])
+ {
+ _beginT = [coder decodeDoubleForKey: @"FOOMFof:beginT"];
+ initPhase = [coder decodeDoubleForKey: @"FOOMFof:initPhase"];
+ }
+ else
+ {
+ [coder decodeValueOfObjCType: @encode(double) at: &_beginT];
+ [coder decodeValueOfObjCType: @encode(double) at: &initPhase];
+ }
+
+ _first = YES;
+
+ if (fof_init_list(&(_fof.list)) == NO)
+ {
+ FOO_ERROR(YES, NO);
+ }
+
+ _fof.inputs.phase = initPhase;
+
return self;
}
|