InlineObject.st
branchjv
changeset 17732 a1892eeca6c0
parent 17711 39faaaf888b4
child 17761 b0e5971141bc
--- a/InlineObject.st	Fri Aug 28 12:38:51 2009 +0100
+++ b/InlineObject.st	Sat Oct 24 16:48:19 2009 +0100
@@ -1,3 +1,14 @@
+"
+ COPYRIGHT (c) 2009 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:#InlineObject
@@ -7,9 +18,62 @@
 	category:'Programming-Support'
 !
 
+!InlineObject class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2009 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
+"
+    WARNING: InlineObjects are an experimental feature.
+
+    All inlineObjects will be instances of an anonymous subclass of me.
+    InlineObjects are written as literals of the form:
+
+    #{ 
+        filedName1: value1.
+        filedName2: value2.
+        ...
+        filedNameN: valueN.
+    }
+
+    For example:
+
+    #{ 
+        firstName: 'Peter'.
+        lastName: 'Miller'.
+        age: 25.
+    }
+        
+"
+! !
+
+!InlineObject methodsFor:'printing & storing'!
+
+storeOn:aStream
+    aStream nextPutAll:'#{'.
+    self class allInstVarNames keysAndValuesDo:[:i :nm |
+        aStream nextPutAll:nm; nextPutAll:':'.
+        (self instVarAt:i) storeOn:aStream.
+        aStream nextPutAll:'. '.
+    ].
+    aStream nextPutAll:'}'.
+! !
 
 !InlineObject class methodsFor:'documentation'!
 
 version
-    ^ '$Id: InlineObject.st 10447 2009-06-14 13:09:55Z vranyj1 $'
+    ^ '$Id: InlineObject.st 10473 2009-10-24 15:48:19Z vranyj1 $'
 ! !
+