1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 04:45:33 +00:00
openmw-tes3mp/apps/opencs/model/doc/saving.cpp
2013-09-16 12:51:57 +02:00

27 lines
No EOL
702 B
C++

#include "saving.hpp"
#include <components/esm/defs.hpp>
#include "../world/data.hpp"
#include "../world/idcollection.hpp"
#include "state.hpp"
#include "savingstages.hpp"
#include "document.hpp"
CSMDoc::Saving::Saving (Document& document)
: Operation (State_Saving, true, true), mDocument (document), mState (*this)
{
appendStage (new OpenSaveStage (mDocument, mState));
appendStage (new WriteHeaderStage (mDocument, mState));
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Global> >
(mDocument.getData().getGlobals(), mState, ESM::REC_GLOB));
appendStage (new CloseSaveStage (mState));
appendStage (new FinalSavingStage (mDocument, mState));
}