author | mawalch |
Mon, 08 Aug 2016 20:13:50 +0200 | |
changeset 1010 | bac4a6f2690e |
parent 866 | a474daf5e46c |
child 992 | f46203ad6470 |
permissions | -rw-r--r-- |
840 | 1 |
"{ Package: 'stx:goodies/monticello' }" |
2 |
||
3 |
Object subclass:#MCStXSnapshotTransformation |
|
4 |
instanceVariableNames:'original transformed' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
7 |
category:'SCM-Monticello-St/X Storing' |
|
8 |
! |
|
9 |
||
10 |
!MCStXSnapshotTransformation class methodsFor:'documentation'! |
|
11 |
||
12 |
documentation |
|
13 |
" |
|
14 |
An abstract superclass to snapshot tranformations. Used to alter MCSnaphot data |
|
15 |
to hide-out nasty differences between St/X and Squeak/Pharo package model so |
|
16 |
.mcz can be safely passed to from one environment to another without information |
|
17 |
loss. |
|
18 |
||
19 |
CAUTION: Tricky. |
|
20 |
||
21 |
[author:] |
|
22 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
23 |
||
24 |
[instance variables:] |
|
25 |
||
26 |
[class variables:] |
|
27 |
||
28 |
[see also:] |
|
29 |
MCStXSnapshotPreWriteTransformation |
|
30 |
MCStXSnapshotPostReadTransformation |
|
31 |
" |
|
32 |
! ! |
|
33 |
||
34 |
!MCStXSnapshotTransformation class methodsFor:'testing'! |
|
35 |
||
36 |
isAbstract |
|
37 |
^self == MCStXSnapshotTransformation |
|
38 |
||
39 |
"Created: / 29-05-2013 / 11:32:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
40 |
! ! |
|
41 |
||
42 |
!MCStXSnapshotTransformation class methodsFor:'transforming'! |
|
43 |
||
44 |
transform: anMCSnapshot |
|
45 |
"Returns a transformed **copy** of the original snapshot" |
|
46 |
||
47 |
^self new transform: anMCSnapshot. |
|
48 |
||
49 |
"Created: / 29-05-2013 / 11:36:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
50 |
! ! |
|
51 |
||
52 |
!MCStXSnapshotTransformation methodsFor:'accessing'! |
|
53 |
||
54 |
original |
|
55 |
^ original |
|
56 |
! |
|
57 |
||
58 |
transformed |
|
59 |
^ transformed |
|
60 |
! ! |
|
61 |
||
62 |
!MCStXSnapshotTransformation methodsFor:'transforming'! |
|
63 |
||
64 |
transform: anMCSnapshot |
|
65 |
"Returns a transformed **copy** of the original snapshot" |
|
66 |
||
67 |
original := anMCSnapshot. |
|
68 |
transformed := original copy. |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
69 |
|
840 | 70 |
"use #copy to allow modifications to definitions collection while |
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
71 |
transforming." |
840 | 72 |
transformed definitions copy reverseDo:[:definition| |
73 |
definition accept: self. |
|
74 |
]. |
|
75 |
^transformed. |
|
76 |
||
77 |
"Created: / 29-05-2013 / 11:40:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
78 |
"Modified: / 31-05-2013 / 00:10:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
840 | 79 |
! ! |
80 |
||
81 |
!MCStXSnapshotTransformation methodsFor:'visiting'! |
|
82 |
||
83 |
visitClassDefinition: definition |
|
84 |
||
85 |
"Modified: / 29-05-2013 / 12:07:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
86 |
! |
|
87 |
||
88 |
visitClassTraitDefinition: definition |
|
89 |
||
90 |
"Modified: / 29-05-2013 / 12:08:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
91 |
! |
|
92 |
||
93 |
visitMetaclassDefinition: definition |
|
94 |
||
95 |
"Modified: / 29-05-2013 / 12:08:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
96 |
! |
|
97 |
||
98 |
visitMethodDefinition: definition |
|
99 |
||
100 |
"Modified: / 29-05-2013 / 12:08:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
101 |
! |
|
102 |
||
103 |
visitOrganizationDefinition: defintion |
|
104 |
||
105 |
"Modified: / 29-05-2013 / 12:08:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
106 |
! |
|
107 |
||
108 |
visitTraitDefinition: definition |
|
109 |
||
110 |
"Modified: / 29-05-2013 / 12:08:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
111 |
! ! |
|
112 |
||
113 |
!MCStXSnapshotTransformation class methodsFor:'documentation'! |
|
114 |
||
115 |
version |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
116 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotTransformation.st,v 1.2 2013-05-30 23:35:33 vrany Exp $' |
840 | 117 |
! |
118 |
||
119 |
version_CVS |
|
866
a474daf5e46c
More improvements in pre-write transformations.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
840
diff
changeset
|
120 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotTransformation.st,v 1.2 2013-05-30 23:35:33 vrany Exp $' |
840 | 121 |
! ! |
122 |