author | Stefan Vogel <sv@exept.de> |
Tue, 03 Jul 2018 23:38:44 +0200 | |
changeset 23189 | 15ea23cfead5 |
parent 21454 | 7c6e37a93527 |
child 23521 | 74d847ad5d1e |
permissions | -rw-r--r-- |
21454 | 1 |
" |
2 |
COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
11960 | 12 |
"{ Package: 'stx:libbasic' }" |
13 |
||
18912 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
11960 | 16 |
Object subclass:#AbstractSourceFileReader |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
15418
1192811fb0dc
class: AbstractSourceFileReader
Claus Gittinger <cg@exept.de>
parents:
14406
diff
changeset
|
20 |
category:'Kernel-Classes-Support' |
11960 | 21 |
! |
22 |
||
14406 | 23 |
!AbstractSourceFileReader class methodsFor:'documentation'! |
24 |
||
21454 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
14406 | 39 |
documentation |
40 |
" |
|
41 |
Abstract common superclass for source file readers |
|
42 |
" |
|
43 |
! ! |
|
11960 | 44 |
|
45 |
!AbstractSourceFileReader class methodsFor:'fileIn'! |
|
46 |
||
47 |
fileIn: aFilename |
|
48 |
||
49 |
^self new fileIn: aFilename |
|
50 |
||
51 |
"Created: / 16-08-2009 / 10:14:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
52 |
! |
|
53 |
||
54 |
fileInStream: aStream |
|
55 |
||
56 |
^self new fileInStream: aStream |
|
57 |
||
58 |
"Created: / 16-08-2009 / 10:15:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
59 |
! ! |
|
60 |
||
18912 | 61 |
!AbstractSourceFileReader class methodsFor:'queries'! |
62 |
||
63 |
isAbstract |
|
64 |
^ self == AbstractSourceFileReader |
|
65 |
! ! |
|
66 |
||
11960 | 67 |
!AbstractSourceFileReader methodsFor:'fileIn'! |
68 |
||
69 |
fileIn:aFilename |
|
70 |
||
71 |
| stream | |
|
72 |
[stream := aFilename asFilename readStream. |
|
73 |
self fileInStream: stream] |
|
74 |
ensure: |
|
13004 | 75 |
[stream notNil ifTrue:[stream close]] |
11960 | 76 |
|
77 |
"Modified: / 15-08-2009 / 14:47:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
13004 | 78 |
"Modified: / 08-08-2010 / 14:38:35 / cg" |
11960 | 79 |
! |
80 |
||
81 |
fileInStream:arg |
|
82 |
"raise an error: must be redefined in concrete subclass(es)" |
|
83 |
||
84 |
^ self subclassResponsibility |
|
85 |
! ! |
|
86 |
||
87 |
!AbstractSourceFileReader class methodsFor:'documentation'! |
|
88 |
||
89 |
version |
|
18912 | 90 |
^ '$Header$' |
12055 | 91 |
! |
92 |
||
93 |
version_CVS |
|
18912 | 94 |
^ '$Header$' |
12055 | 95 |
! |
96 |
||
97 |
version_SVN |
|
18912 | 98 |
^'$Id$' |
11960 | 99 |
! ! |
15418
1192811fb0dc
class: AbstractSourceFileReader
Claus Gittinger <cg@exept.de>
parents:
14406
diff
changeset
|
100 |