OSHandle.st
author Claus Gittinger <cg@exept.de>
Wed, 08 Feb 2006 19:27:36 +0100
changeset 9103 b934315bb0b1
parent 7593 e7550b9ef84a
child 16341 5d233b3b858c
child 17711 39faaaf888b4
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 1999 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' }"

ExternalAddress subclass:#OSHandle
	instanceVariableNames:''
	classVariableNames:'Lobby'
	poolDictionaries:''
	category:'Compatibility-ST80'
!

!OSHandle class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1999 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.
"
!

documentation
"
    Ongoing work: 
        extract handle specific operations and rewrite Streams, Sockets etc.
        to pass all work to these handles.

    [author:]
        Claus Gittinger
"
! !

!OSHandle class methodsFor:'initialization'!

initialize
    Lobby := Registry new.
! !

!OSHandle class methodsFor:'Compatibility-VW'!

currentOS
    "ST-80 compatibility."

    "/ mhmh what does ST80/VW returned here ?

    OperatingSystem isUNIXlike ifTrue:[^ #unix].
    OperatingSystem isOS2like  ifTrue:[^ #os2].
    OperatingSystem isMSWINDOWSlike  ifTrue:[^ #windows].
    ^ #unknown

    "
     OSHandle currentOS
    "
!

currentProcessID
    "ST-80 compatibility."

    ^ OperatingSystem getProcessId

    "
     OSHandle currentProcessID
    "

    "Created: / 30.10.2001 / 17:31:55 / cg"
! !

!OSHandle methodsFor:'finalization'!

finalizationLobby
    "answer a Registry used for finalization."

    ^ Lobby
!

finalize
    self subclassResponsibility
! !

!OSHandle methodsFor:'queries'!

isValid
     ^ self address ~~0
! !

!OSHandle class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/OSHandle.st,v 1.11 2006-02-08 18:27:36 cg Exp $'
! !

OSHandle initialize!