EOFObject.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 23575 853a4f70d0c5
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...

"
 COPYRIGHT (c) 2018 by Claus Gittinger
              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' }"

"{ NameSpace: Smalltalk }"

Object subclass:#EOFObject
	instanceVariableNames:''
	classVariableNames:'TheOneAndOnlyEOF'
	poolDictionaries:''
	category:'Kernel-Objects'
!

!EOFObject class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2018 by Claus Gittinger
              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.
"
!

documentation
"
    there is only one instance of this class: EOF,
    representing an EOF token.

    This is mainly present for stream-pipe processing,
    and may be used to signal the end of a stream.

    Smalltalk code does not normally use it.

    [author:]
        Claus Gittinger
"
! !

!EOFObject class methodsFor:'instance creation'!

basicNew
    TheOneAndOnlyEOF isNil ifTrue:[
        TheOneAndOnlyEOF := super basicNew.
    ].
    ^ TheOneAndOnlyEOF

    "
     EOFObject basicNew
     EOFObject new
    "

    "Modified: / 20-12-2018 / 16:57:47 / Claus Gittinger"
! !

!EOFObject class methodsFor:'class initialization'!

initialize
    |singleton|

    singleton := self basicNew.
    Smalltalk at:#EOF put:singleton

    "Modified: / 14-03-2018 / 19:32:23 / stefan"
    "Modified (format): / 20-12-2018 / 16:56:32 / Claus Gittinger"
! !

!EOFObject methodsFor:'printing & storing'!

printOn:aStream
    aStream nextPutAll:'<EOF>'.

    "Modified: / 20-12-2018 / 16:58:09 / Claus Gittinger"
! !

!EOFObject methodsFor:'queries'!

isEOF
    ^ true

    "
     EOF isEOF
    "

    "Created: / 20-12-2018 / 16:57:59 / Claus Gittinger"
! !

!EOFObject class methodsFor:'documentation'!

version_CVS
    ^ '$Header$'
! !


EOFObject initialize!