home *** CD-ROM | disk | FTP | other *** search
- //
- // _MiscMergeFieldCommand.m -- "field" merge command implementation
- // Written by Don Yacktman Copyright (c) 1995 by Don Yacktman.
- // Version 1.0. All rights reserved.
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
-
- #import <misckit/miscmerge.h>
- #import "_MiscMergeFieldCommand.h"
-
- @implementation _MiscMergeFieldCommand
-
- static MiscString *myKey = nil;
-
- - parseFromString:(MiscString *)aString
- {
- if (!myKey) {
- myKey = [MiscString new];
- [myKey setStringValue:"field"];
- }
- if ([self eatKeyWord:myKey from:aString isOptional:YES])
- [aString trimLeadWhiteSpaces];
- theField = [aString copy];
- return self;
- }
-
-
- - executeForMerge:(MiscMergeEngine *)aMerger
- {
- [aMerger appendToOutput:[aMerger getField:theField]];
- return self;
- }
-
- @end
-