1 // copyright 2003 stefan kersten <steve@k-hornz.de>
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21 stream = CollStream.new;
22 this.storeLispOn(stream);
28 storeLispOn { arg stream;
29 stream << "#<" << this << ">"
34 storeLispOn { arg stream;
35 stream.putAll(this.asString)
43 storeLispOn { arg stream;
44 // note, extra space after \\ is for emacs paren matching
45 // not syntactically significant
46 stream.put($").putAll(this.escapeChar($\\ ).escapeChar($")).put($")
51 storeLispOn { arg stream;
52 stream.putAll("?"++this)
57 storeLispOn { arg stream;
58 ("#"++(red*255).asInteger.asHexString(2)
59 ++(green*255).asInteger.asHexString(2)
60 ++(blue*255).asInteger.asHexString(2)).storeLispOn(stream)
65 storeLispOn { arg stream;
71 storeLispOn { arg stream;
77 storeLispOn { arg stream;
83 storeLispOn { arg stream;
84 nil.storeLispOn(stream)
89 storeLispOn { arg stream;
91 this.key.storeLispOn(stream);
92 stream.space.put($.).space;
93 this.value.storeLispOn(stream);
99 lispDo { arg function;
103 storeLispOn { arg stream;
105 this.lispDo { arg x, i;
106 if (i != 0) { stream.space };
107 x.storeLispOn(stream);
114 lispDo { arg function;
115 this.associationsDo(function)