1
|
1 |
"{ Package: 'cvut:fel/cface' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Cface }"
|
|
4 |
|
|
5 |
Object subclass:#Platform
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:'TheInstance'
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Cface-Platforms'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!Platform class methodsFor:'accessing'!
|
|
14 |
|
|
15 |
theInstance
|
|
16 |
|
|
17 |
TheInstance ifNil:
|
|
18 |
[Smalltalk isSmalltalkX
|
|
19 |
ifTrue:[TheInstance := SmalltalkX new]
|
|
20 |
ifFalse:[self error:'Unsupported platform']].
|
|
21 |
^TheInstance
|
|
22 |
|
|
23 |
"Created: / 08-02-2008 / 08:17:48 / janfrog"
|
|
24 |
! !
|
|
25 |
|
|
26 |
!Platform methodsFor:'accessing'!
|
|
27 |
|
|
28 |
generator
|
|
29 |
|
|
30 |
^self generatorClass new
|
|
31 |
|
|
32 |
"Created: / 18-02-2008 / 15:31:25 / janfrog"
|
|
33 |
!
|
|
34 |
|
|
35 |
generatorCommand
|
|
36 |
|
|
37 |
^GeneratorCommand new platform: self
|
|
38 |
|
|
39 |
"Created: / 18-02-2008 / 15:34:28 / janfrog"
|
|
40 |
!
|
|
41 |
|
|
42 |
mappings
|
|
43 |
^ self mappingClass new
|
|
44 |
|
|
45 |
"Created: / 27-05-2008 / 14:23:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
46 |
!
|
|
47 |
|
|
48 |
parser
|
|
49 |
|
|
50 |
^self parserClass
|
|
51 |
|
|
52 |
"Created: / 18-02-2008 / 15:38:41 / janfrog"
|
|
53 |
!
|
|
54 |
|
|
55 |
typeMapper
|
|
56 |
|
|
57 |
^self typeMapperClass new
|
|
58 |
|
|
59 |
"Created: / 18-02-2008 / 15:32:12 / janfrog"
|
|
60 |
!
|
|
61 |
|
|
62 |
typeResolver
|
|
63 |
|
|
64 |
^self typeResolverClass new
|
|
65 |
|
|
66 |
"Created: / 18-02-2008 / 15:32:05 / janfrog"
|
|
67 |
! !
|
|
68 |
|
|
69 |
!Platform methodsFor:'accessing - classes'!
|
|
70 |
|
|
71 |
generatorClass
|
|
72 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
73 |
|
|
74 |
^ self subclassResponsibility
|
|
75 |
|
|
76 |
"Created: / 18-02-2008 / 15:31:35 / janfrog"
|
|
77 |
!
|
|
78 |
|
|
79 |
mappingClass
|
|
80 |
|
|
81 |
^TypeMapping
|
|
82 |
|
|
83 |
"Created: / 27-05-2008 / 14:22:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
84 |
!
|
|
85 |
|
|
86 |
parserClass
|
|
87 |
|
|
88 |
|
|
89 |
^CDefinitionParser
|
|
90 |
|
|
91 |
"Created: / 18-02-2008 / 15:38:12 / janfrog"
|
|
92 |
!
|
|
93 |
|
|
94 |
typeMapperClass
|
|
95 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
96 |
|
|
97 |
^TypeMapper
|
|
98 |
|
|
99 |
"Created: / 18-02-2008 / 15:31:55 / janfrog"
|
|
100 |
!
|
|
101 |
|
|
102 |
typeResolverClass
|
|
103 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
104 |
|
|
105 |
^TypeResolver
|
|
106 |
|
|
107 |
"Created: / 18-02-2008 / 15:31:46 / janfrog"
|
|
108 |
! !
|
|
109 |
|
|
110 |
!Platform class methodsFor:'documentation'!
|
|
111 |
|
|
112 |
version
|
|
113 |
^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__Platform.st,v 1.1 2008/02/26 15:58:07 vranyj1 Exp $'
|
14
|
114 |
!
|
|
115 |
|
|
116 |
version_SVN
|
|
117 |
^ '$Id$'
|
1
|
118 |
! !
|