MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / Write

Method Write

src/object.cpp:163–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void 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
187bool ObjectCollection::Read( wxInputStream &input )
188{

Callers

nothing calls this directly

Calls 3

SortMethod · 0.80
CountMethod · 0.80
GetTypeNameMethod · 0.45

Tested by

no test coverage detected