OSHandle.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 07 Jul 2011 23:08:07 +0100
branchjv
changeset 17845 7e0cfaac936d
parent 17761 b0e5971141bc
child 17846 24edc476ac18
permissions -rw-r--r--
Merged with /trunk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7593
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     1
"
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     2
 COPYRIGHT (c) 1999 by eXept Software AG
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     3
              All Rights Reserved
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     4
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     5
 This software is furnished under a license and may be used
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     6
 only in accordance with the terms of that license and with the
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
     9
 other person.  No title to or ownership of the software is
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    10
 hereby transferred.
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    11
"
5409
9b5890348f9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4763
diff changeset
    12
"{ Package: 'stx:libbasic' }"
9b5890348f9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4763
diff changeset
    13
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
ExternalAddress subclass:#OSHandle
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
9103
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    16
	classVariableNames:'Lobby'
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
5740
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    18
	category:'Compatibility-ST80'
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
6226
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    21
!OSHandle class methodsFor:'documentation'!
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    22
7593
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    23
copyright
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    24
"
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    25
 COPYRIGHT (c) 1999 by eXept Software AG
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    26
              All Rights Reserved
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    27
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    28
 This software is furnished under a license and may be used
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    29
 only in accordance with the terms of that license and with the
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    31
 be provided or otherwise made available to, or used by, any
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    32
 other person.  No title to or ownership of the software is
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    33
 hereby transferred.
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    34
"
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    35
!
e7550b9ef84a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7298
diff changeset
    36
6226
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    37
documentation
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    38
"
9103
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    39
    Ongoing work: 
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    40
        extract handle specific operations and rewrite Streams, Sockets etc.
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    41
        to pass all work to these handles.
6226
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    42
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    43
    [author:]
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    44
        Claus Gittinger
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    45
"
d45b429492ec documentation
Claus Gittinger <cg@exept.de>
parents: 6124
diff changeset
    46
! !
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
9103
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    48
!OSHandle class methodsFor:'initialization'!
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    49
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    50
initialize
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    51
    Lobby := Registry new.
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    52
! !
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    53
7298
9b3c69eb2c5d category
Claus Gittinger <cg@exept.de>
parents: 6439
diff changeset
    54
!OSHandle class methodsFor:'Compatibility-VW'!
5740
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    55
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    56
currentOS
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    57
    "ST-80 compatibility."
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    58
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    59
    "/ mhmh what does ST80/VW returned here ?
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    60
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    61
    OperatingSystem isUNIXlike ifTrue:[^ #unix].
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    62
    OperatingSystem isOS2like  ifTrue:[^ #os2].
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    63
    OperatingSystem isMSWINDOWSlike  ifTrue:[^ #windows].
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    64
    ^ #unknown
6295
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    65
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    66
    "
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    67
     OSHandle currentOS
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    68
    "
6124
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    69
!
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    70
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    71
currentProcessID
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    72
    "ST-80 compatibility."
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    73
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    74
    ^ OperatingSystem getProcessId
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    75
6295
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    76
    "
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    77
     OSHandle currentProcessID
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    78
    "
8cd84857b5bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6226
diff changeset
    79
6124
81baa6b991c3 currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents: 5966
diff changeset
    80
    "Created: / 30.10.2001 / 17:31:55 / cg"
5740
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    81
! !
a634006d10be checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    82
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
!OSHandle methodsFor:'finalization'!
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
9103
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    85
finalizationLobby
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    86
    "answer a Registry used for finalization."
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    87
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    88
    ^ Lobby
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    89
!
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    90
6439
0f841258ec4a Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents: 6295
diff changeset
    91
finalize
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    self subclassResponsibility
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
! !
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
9103
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    95
!OSHandle methodsFor:'queries'!
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    96
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    97
isValid
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    98
     ^ self address ~~0
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
    99
! !
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
   100
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
!OSHandle class methodsFor:'documentation'!
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
version
17845
7e0cfaac936d Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17761
diff changeset
   104
    ^ '$Id: OSHandle.st 10656 2011-07-07 22:08:07Z vranyj1 $'
17761
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   105
!
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   106
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   107
version_SVN
17845
7e0cfaac936d Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17761
diff changeset
   108
    ^ '$Id: OSHandle.st 10656 2011-07-07 22:08:07Z vranyj1 $'
4763
d15c41a66ec4 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
! !
9103
b934315bb0b1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7593
diff changeset
   110
17845
7e0cfaac936d Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17761
diff changeset
   111
OSHandle initialize!