| 161 | } |
| 162 | |
| 163 | void ObjectCollection::Write( wxOutputStream &output ) |
| 164 | { |
| 165 | wxArrayString list; |
| 166 | wxDataOutputStream out(output); |
| 167 | |
| 168 | out.Write16( 0x2f ); // identifier code |
| 169 | out.Write16( 1 ); // data format version |
| 170 | |
| 171 | out.Write32( size() ); |
| 172 | wxArrayString objs = GetNames(); |
| 173 | objs.Sort(); |
| 174 | for ( size_t i=0;i<objs.Count();i++ ) |
| 175 | { |
| 176 | Object *obj = Lookup( objs[i] ); |
| 177 | assert( obj != 0 ); |
| 178 | |
| 179 | out.WriteString( objs[i] ); |
| 180 | out.WriteString( obj->GetTypeName() ); |
| 181 | obj->Write( output ); |
| 182 | } |
| 183 | |
| 184 | out.Write16( 0x2f ); // identifier code to finish |
| 185 | } |
| 186 | |
| 187 | bool ObjectCollection::Read( wxInputStream &input ) |
| 188 | { |
nothing calls this directly
no test coverage detected