22 os(ostrm),
23 singlePrecision(true) {
24
25
26 union { long l; char c[sizeof (long)]; } u;
27 u.l = 1;
28 isBigEndian = (u.c[sizeof (long) - 1] == 1);
29
30
31
32 if (tags.size() <= 0) {
33
34 tags["heprep"] = 0x05;
35 tags["attdef"] = 0x06;
36 tags["attvalue"] = 0x07;
37 tags["instance"] = 0x08;
38 tags["treeid"] = 0x09;
39 tags["action"] = 0x0a;
40 tags["instancetree"] = 0x0b;
41 tags["type"] = 0x0c;
42 tags["typetree"] = 0x0d;
43 tags["layer"] = 0x0e;
44 tags["point"] = 0x0f;
45 }
46
47 if (attributes.size() <= 0) {
48
49 attributes["version"] = 0x05;
50 attributes["xmlns"] = 0x06;
51 attributes["xmlns:xsi"] = 0x07;
52 attributes["xsi:schemaLocation"] = 0x08;
53
54 attributes["valueString"] = 0x10;
55 attributes["valueColor"] = 0x11;
56 attributes["valueLong"] = 0x12;
57 attributes["valueInt"] = 0x13;
58 attributes["valueBoolean"] = 0x14;
59 attributes["valueDouble"] = 0x15;
60
61 attributes["name"] = 0x20;
62 attributes["type"] = 0x22;
63 attributes["showlabel"] = 0x23;
64 attributes["desc"] = 0x24;
65 attributes["category"] = 0x25;
66 attributes["extra"] = 0x26;
67 attributes["x"] = 0x27;
68 attributes["y"] = 0x28;
69 attributes["z"] = 0x29;
70 attributes["qualifier"] = 0x2a;
71 attributes["expression"] = 0x2b;
72 attributes["typetreename"] = 0x2c;
73 attributes["typetreeversion"] = 0x2d;
74 attributes["order"] = 0x2e;
75
76
77 attributes["eof"] = 0x7f;
78 }
79
80 if (values.size() <= 0) {
81
82 values["drawas"] = 0x85;
83 values["drawasoptions"] = 0x86;
84 values["visibility"] = 0x87;
85
86 values["label"] = 0x88;
87
88 values["fontname"] = 0x89;
89 values["fontstyle"] = 0x8a;
90 values["fontsize"] = 0x8b;
91 values["fontcolor"] = 0x8c;
92 values["fonthasframe"] = 0x8d;
93 values["fontframecolor"] = 0x8e;
94 values["fontframewidth"] = 0x8f;
95 values["fonthasbanner"] = 0x90;
96 values["fontbannercolor"] = 0x91;
97
98 values["color"] = 0x92;
99 values["framecolor"] = 0x93;
100 values["layer"] = 0x94;
101 values["markname"] = 0x95;
102 values["marksize"] = 0x96;
103 values["marksizemultiplier"] = 0x97;
104 values["marktype"] = 0x98;
105 values["hasframe"] = 0x99;
106 values["framecolor"] = 0x9a;
107 values["framewidth"] = 0x9b;
108
109 values["linestyle"] = 0x9c;
110 values["linewidth"] = 0x9d;
111 values["linewidthmultiplier"] = 0x9e;
112 values["linehasarrow"] = 0x9f;
113
114 values["fillcolor"] = 0xa0;
115 values["filltype"] = 0xa1;
116 values["fill"] = 0xa2;
117
118 values["radius"] = 0xa3;
119 values["phi"] = 0xa4;
120 values["theta"] = 0xa5;
121 values["omega"] = 0xa6;
122 values["radius1"] = 0xa7;
123 values["radius2"] = 0xa8;
124 values["radius3"] = 0xa9;
125 values["curvature"] = 0xaa;
126 values["flylength"] = 0xab;
127 values["faces"] = 0xac;
128
129 values["text"] = 0xad;
130 values["hpos"] = 0xae;
131 values["vpos"] = 0xaf;
132 values["halign"] = 0xb0;
133 values["valign"] = 0xb1;
134
135 values["ispickable"] = 0xb2;
136 values["showparentvalues"] = 0xb3;
137 values["pickparent"] = 0xb4;
138
139
140 values["false"] = 0xd0;
141 values["true"] = 0xd1;
142
143 values["point"] = 0xd2;
144 values["line"] = 0xd3;
145 values["helix"] = 0xd4;
146 values["polygon"] = 0xd5;
147 values["circle"] = 0xd6;
148 values["curve"] = 0xd7;
149 values["ellipse"] = 0xd8;
150 values["ellipsoid"] = 0xd9;
151 values["prism"] = 0xda;
152 values["cylinder"] = 0xdb;
153 values["ellipseprism"] = 0xdc;
154 values["text"] = 0xdd;
155
156 values["nonzero"] = 0xde;
157 values["evenodd"] = 0xdf;
158
159 values["circle"] = 0xe0;
160 values["box"] = 0xe1;
161 values["uptriangle"] = 0xe2;
162 values["dntriangle"] = 0xe3;
163 values["diamond"] = 0xe4;
164 values["cross"] = 0xe5;
165 values["star"] = 0xe6;
166 values["plus"] = 0xe7;
167 values["hline"] = 0xe8;
168 values["vline"] = 0xe9;
169
170 values["solid"] = 0xea;
171 values["dotted"] = 0xeb;
172 values["dashed"] = 0xec;
173 values["dotdash"] = 0xed;
174
175 values["none"] = 0xee;
176 values["start"] = 0xef;
177 values["end"] = 0xf0;
178 values["both"] = 0xf1;
179
180 values["serif"] = 0xf2;
181 values["sansserif"] = 0xf3;
182 values["monotype"] = 0xf4;
183 values["symbol"] = 0xf5;
184
185 values["plain"] = 0xf6;
186 values["bold"] = 0xf7;
187 values["italic"] = 0xf8;
188
189 values["top"] = 0xf9;
190 values["baseline"] = 0xfa;
191 values["center"] = 0xfb;
192 values["bottom"] = 0xfc;
193
194 values["left"] = 0xfd;
195 values["right"] = 0xfe;
196
197 values["default"] = 0xff;
198 }
199 }
AbstractXMLWriter(std::string aDefaultNameSpace)