AbstractSourceFileReader.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 12 Jul 2010 17:20:36 +0100
branchjv
changeset 17780 b6e42c92eba0
parent 17772 6e0b3c06c364
child 17795 569eec7576f1
permissions -rw-r--r--
Merged with /trunk

"
 COPYRIGHT (c) 2006 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libbasic' }"

Object subclass:#AbstractSourceFileReader
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Classes'
!

!AbstractSourceFileReader class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
! !

!AbstractSourceFileReader class methodsFor:'fileIn'!

fileIn: aFilename

    ^self new fileIn: aFilename

    "Created: / 16-08-2009 / 10:14:51 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

fileInStream: aStream

    ^self new fileInStream: aStream

    "Created: / 16-08-2009 / 10:15:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!AbstractSourceFileReader methodsFor:'fileIn'!

fileIn:aFilename

    | stream |
    [stream := aFilename asFilename readStream.
    self fileInStream: stream]
        ensure:
            [stream ifNotNil:[stream close]]

    "Modified: / 15-08-2009 / 14:47:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

fileInStream:arg
    "raise an error: must be redefined in concrete subclass(es)"

    ^ self subclassResponsibility
! !

!AbstractSourceFileReader class methodsFor:'documentation'!

version
    ^ '$Id: AbstractSourceFileReader.st 10544 2010-07-12 16:20:36Z vranyj1 $'
!

version_CVS
    ^ '§Header: /cvs/stx/stx/libbasic/AbstractSourceFileReader.st,v 1.4 2009/10/08 11:50:15 fm Exp §'
!

version_SVN
    ^ '$Id: AbstractSourceFileReader.st 10544 2010-07-12 16:20:36Z vranyj1 $'
! !