mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-02 03:16:11 -04:00
Added serverDatabase library
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// TaskSaveSnapshot.cpp
|
||||
// copyright (c) 2001 Sony Online Entertainment
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "serverDatabase/FirstServerDatabase.h"
|
||||
#include "serverDatabase/TaskSaveSnapshot.h"
|
||||
|
||||
#include "serverDatabase/Persister.h"
|
||||
#include "serverDatabase/Snapshot.h"
|
||||
#include "sharedFoundation/NetworkIdArchive.h" //TODO: Windows build breaks without this. Why? Makes no sense.
|
||||
|
||||
// ======================================================================
|
||||
|
||||
TaskSaveSnapshot::TaskSaveSnapshot(Snapshot *snapshot) :
|
||||
m_snapshot(snapshot)
|
||||
{
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool TaskSaveSnapshot::process(DB::Session *session)
|
||||
{
|
||||
return (m_snapshot->saveToDB(session));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void TaskSaveSnapshot::onComplete()
|
||||
{
|
||||
m_snapshot->saveCompleted();
|
||||
Persister::getInstance().saveCompleted(m_snapshot);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
Reference in New Issue
Block a user