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