InlineObject.st
author Merge Script
Sun, 07 Jun 2015 06:38:49 +0200
branchjv
changeset 18457 214d760f8247
parent 18011 deb0c3355881
child 18461 bc3d3101c493
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11912
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     1
"
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     2
 COPYRIGHT (c) 2009 by eXept Software AG
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     3
              All Rights Reserved
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     4
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     5
 This software is furnished under a license and may be used
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     6
 only in accordance with the terms of that license and with the
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     8
 be provided or otherwise made available to, or used by, any
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
     9
 other person.  No title to or ownership of the software is
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    10
 hereby transferred.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    11
"
11444
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic' }"
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
Object subclass:#InlineObject
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Programming-Support'
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
11912
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    21
!InlineObject class methodsFor:'documentation'!
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    22
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    23
copyright
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    24
"
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    25
 COPYRIGHT (c) 2009 by eXept Software AG
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    26
              All Rights Reserved
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    27
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    28
 This software is furnished under a license and may be used
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    29
 only in accordance with the terms of that license and with the
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    31
 be provided or otherwise made available to, or used by, any
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    32
 other person.  No title to or ownership of the software is
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    33
 hereby transferred.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    34
"
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    35
!
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    36
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    37
documentation
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    38
"
11913
1fa1ac64239b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11912
diff changeset
    39
    WARNING: InlineObjects are an experimental feature.
1fa1ac64239b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11912
diff changeset
    40
11912
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    41
    All inlineObjects will be instances of an anonymous subclass of me.
11913
1fa1ac64239b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11912
diff changeset
    42
    InlineObjects are written as literals of the form:
11912
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    43
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    44
    #{ 
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    45
        filedName1: value1.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    46
        filedName2: value2.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    47
        ...
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    48
        filedNameN: valueN.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    49
    }
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    50
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    51
    For example:
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    52
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    53
    #{ 
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    54
        firstName: 'Peter'.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    55
        lastName: 'Miller'.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    56
        age: 25.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    57
    }
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    58
        
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    59
"
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    60
! !
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    61
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    62
!InlineObject methodsFor:'printing & storing'!
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    63
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    64
storeOn:aStream
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    65
    aStream nextPutAll:'#{'.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    66
    self class allInstVarNames keysAndValuesDo:[:i :nm |
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    67
        aStream nextPutAll:nm; nextPutAll:':'.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    68
        (self instVarAt:i) storeOn:aStream.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    69
        aStream nextPutAll:'. '.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    70
    ].
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    71
    aStream nextPutAll:'}'.
846a85c9fcbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11444
diff changeset
    72
! !
11444
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!InlineObject class methodsFor:'documentation'!
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
version
11913
1fa1ac64239b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 11912
diff changeset
    77
    ^ '$Header: /cvs/stx/stx/libbasic/InlineObject.st,v 1.3 2009-09-11 13:05:01 cg Exp $'
11444
1d3cf0e91729 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
! !