//saves the store into a datastream, be it memory or file int STOImporter::PutStore(DataStream *stream, Store *store) { int ret; if (!stream || !store) { return -1; } ret = PutHeader( stream, store); if (ret) { return ret; } ret = PutDrinks( stream, store); if (ret) { return ret; } ret = PutCures( stream, store); if (ret) { return ret; } ret = PutPurchasedCategories (stream, store); if (ret) { return ret; } ret = PutItems( stream, store); return ret; }
//saves the store into a datastream, be it memory or file bool STOImporter::PutStore(DataStream *stream, Store *store) { if (!stream || !store) { return false; } CalculateStoredFileSize(store); PutHeader(stream, store); PutDrinks(stream, store); PutCures(stream, store); PutPurchasedCategories(stream, store); PutItems(stream, store); return true; }