1
|
1 |
"{ Package: 'cvut:fel/cface' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Cface }"
|
|
4 |
|
|
5 |
Object subclass:#GeneratorCommand
|
|
6 |
instanceVariableNames:'platform mappings definitions'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Cface-Generators'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!GeneratorCommand methodsFor:'accessing'!
|
|
14 |
|
|
15 |
definitions
|
|
16 |
^ definitions
|
|
17 |
|
|
18 |
"Created: / 18-02-2008 / 15:36:22 / janfrog"
|
|
19 |
!
|
|
20 |
|
|
21 |
definitions:aFilename
|
|
22 |
definitions := self platform parser parse: aFilename contents asString.
|
|
23 |
|
|
24 |
"Created: / 18-02-2008 / 15:36:22 / janfrog"
|
|
25 |
!
|
|
26 |
|
|
27 |
mappings
|
|
28 |
^ mappings ifNil:[platform mappings]
|
|
29 |
|
|
30 |
"Created: / 18-02-2008 / 15:35:04 / janfrog"
|
|
31 |
"Modified: / 27-05-2008 / 14:22:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
32 |
!
|
|
33 |
|
|
34 |
mappings:something
|
|
35 |
mappings := something.
|
|
36 |
|
|
37 |
"Created: / 18-02-2008 / 15:35:04 / janfrog"
|
|
38 |
!
|
|
39 |
|
|
40 |
platform
|
|
41 |
|
|
42 |
platform ifNil:[platform := Cface::Platform theInstance].
|
|
43 |
^platform
|
|
44 |
|
|
45 |
"Created: / 18-02-2008 / 15:28:45 / janfrog"
|
|
46 |
!
|
|
47 |
|
|
48 |
platform:something
|
|
49 |
platform := something.
|
|
50 |
|
|
51 |
"Created: / 18-02-2008 / 15:30:12 / janfrog"
|
|
52 |
!
|
|
53 |
|
|
54 |
typeMapper
|
|
55 |
|
|
56 |
^platform typeMapper
|
|
57 |
|
|
58 |
"Created: / 18-02-2008 / 15:30:40 / janfrog"
|
|
59 |
!
|
|
60 |
|
|
61 |
typeResolver
|
|
62 |
|
|
63 |
^platform typeResolver
|
|
64 |
|
|
65 |
"Created: / 18-02-2008 / 15:30:32 / janfrog"
|
|
66 |
! !
|
|
67 |
|
|
68 |
!GeneratorCommand methodsFor:'processing'!
|
|
69 |
|
|
70 |
process
|
|
71 |
|
|
72 |
|
|
73 |
self platform typeResolver process: definitions.
|
|
74 |
self platform typeMapper process: definitions using: self mappings.
|
|
75 |
self halt.
|
|
76 |
|
|
77 |
"Created: / 18-02-2008 / 15:25:54 / janfrog"
|
|
78 |
"Modified: / 27-05-2008 / 14:23:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
79 |
! !
|
|
80 |
|
|
81 |
!GeneratorCommand class methodsFor:'documentation'!
|
|
82 |
|
|
83 |
version
|
|
84 |
^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__GeneratorCommand.st,v 1.1 2008/02/26 15:58:30 vranyj1 Exp $'
|
|
85 |
! !
|