--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MCMcdWriter.st Wed Nov 22 14:04:57 2006 +0100
@@ -0,0 +1,56 @@
+"{ Package: 'stx:goodies/monticello' }"
+
+MCMczWriter subclass:#MCMcdWriter
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Monticello-Storing'
+!
+
+
+!MCMcdWriter class methodsFor:'as yet unclassified'!
+
+readerClass
+ ^ MCMcdReader
+! !
+
+!MCMcdWriter methodsFor:'as yet unclassified'!
+
+writeBaseInfo: aVersionInfo
+ | string |
+ string _ self serializeVersionInfo: aVersionInfo.
+ self addString: string at: 'base'.
+!
+
+writeDefinitions: aVersion
+ self writeBaseInfo: aVersion baseInfo.
+ self writePatch: aVersion patch.
+!
+
+writeNewDefinitions: aCollection
+ self addString: (self serializeDefinitions: aCollection) at: 'new/source.', self snapshotWriterClass extension.
+!
+
+writeOldDefinitions: aCollection
+ self addString: (self serializeDefinitions: aCollection) at: 'old/source.', self snapshotWriterClass extension.
+!
+
+writePatch: aPatch
+ | old new |
+ old _ OrderedCollection new.
+ new _ OrderedCollection new.
+ aPatch operations do:
+ [:ea |
+ ea isRemoval ifTrue: [old add: ea definition].
+ ea isAddition ifTrue: [new add: ea definition].
+ ea isModification ifTrue: [old add: ea baseDefinition. new add: ea definition]].
+ self writeOldDefinitions: old.
+ self writeNewDefinitions: new.
+ self addString: (self serializeInBinary: aPatch) at: 'patch.bin'.
+! !
+
+!MCMcdWriter class methodsFor:'documentation'!
+
+version
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCMcdWriter.st,v 1.1 2006-11-22 13:04:57 cg Exp $'
+! !