author | Stefan Vogel <sv@exept.de> |
Fri, 27 Oct 2017 16:14:37 +0200 | |
branch | expecco_2_11_1_branch |
changeset 22329 | 20662662693b |
parent 18912 | 74cb6f5274d7 |
child 18919 | dbe023989a90 |
child 21454 | 7c6e37a93527 |
permissions | -rw-r--r-- |
11960 | 1 |
"{ Package: 'stx:libbasic' }" |
2 |
||
18912 | 3 |
"{ NameSpace: Smalltalk }" |
4 |
||
11960 | 5 |
Object subclass:#AbstractSourceFileReader |
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
15418
1192811fb0dc
class: AbstractSourceFileReader
Claus Gittinger <cg@exept.de>
parents:
14406
diff
changeset
|
9 |
category:'Kernel-Classes-Support' |
11960 | 10 |
! |
11 |
||
14406 | 12 |
!AbstractSourceFileReader class methodsFor:'documentation'! |
13 |
||
14 |
documentation |
|
15 |
" |
|
16 |
Abstract common superclass for source file readers |
|
17 |
" |
|
18 |
! ! |
|
11960 | 19 |
|
20 |
!AbstractSourceFileReader class methodsFor:'fileIn'! |
|
21 |
||
22 |
fileIn: aFilename |
|
23 |
||
24 |
^self new fileIn: aFilename |
|
25 |
||
26 |
"Created: / 16-08-2009 / 10:14:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
27 |
! |
|
28 |
||
29 |
fileInStream: aStream |
|
30 |
||
31 |
^self new fileInStream: aStream |
|
32 |
||
33 |
"Created: / 16-08-2009 / 10:15:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
34 |
! ! |
|
35 |
||
18912 | 36 |
!AbstractSourceFileReader class methodsFor:'queries'! |
37 |
||
38 |
isAbstract |
|
39 |
^ self == AbstractSourceFileReader |
|
40 |
! ! |
|
41 |
||
11960 | 42 |
!AbstractSourceFileReader methodsFor:'fileIn'! |
43 |
||
44 |
fileIn:aFilename |
|
45 |
||
46 |
| stream | |
|
47 |
[stream := aFilename asFilename readStream. |
|
48 |
self fileInStream: stream] |
|
49 |
ensure: |
|
13004 | 50 |
[stream notNil ifTrue:[stream close]] |
11960 | 51 |
|
52 |
"Modified: / 15-08-2009 / 14:47:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
13004 | 53 |
"Modified: / 08-08-2010 / 14:38:35 / cg" |
11960 | 54 |
! |
55 |
||
56 |
fileInStream:arg |
|
57 |
"raise an error: must be redefined in concrete subclass(es)" |
|
58 |
||
59 |
^ self subclassResponsibility |
|
60 |
! ! |
|
61 |
||
62 |
!AbstractSourceFileReader class methodsFor:'documentation'! |
|
63 |
||
64 |
version |
|
18912 | 65 |
^ '$Header$' |
12055 | 66 |
! |
67 |
||
68 |
version_CVS |
|
18912 | 69 |
^ '$Header$' |
12055 | 70 |
! |
71 |
||
72 |
version_SVN |
|
18912 | 73 |
^'$Id$' |
11960 | 74 |
! ! |
15418
1192811fb0dc
class: AbstractSourceFileReader
Claus Gittinger <cg@exept.de>
parents:
14406
diff
changeset
|
75 |