Added current case to socket server.

Fixed includes on Windows
p4#: 21725
This commit is contained in:
Magne Sjaastad 2013-05-26 21:55:05 +02:00
parent fbc02e79b0
commit 2afca2bd5d
2 changed files with 35 additions and 2 deletions

View File

@ -30,6 +30,18 @@
#include "RimProject.h"
#include "RimCase.h"
#include "RimResultSlot.h"
#include "RimCellEdgeResultSlot.h"
#include "RimCellRangeFilterCollection.h"
#include "RimCellPropertyFilterCollection.h"
#include "RimWellCollection.h"
#include "Rim3dOverlayInfoConfig.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimScriptCollection.h"
#include "RimCaseCollection.h"
#include "RimWellPathCollection.h"
#include "RimReservoirCellResultsCacher.h"
#include "RigCaseData.h"
#include "RigCaseCellResultsData.h"
@ -45,7 +57,8 @@ RiaSocketServer::RiaSocketServer(QObject* parent)
m_tcpServer(NULL),
m_currentClient(NULL),
m_currentCommandSize(0),
m_currentCommand(NULL)
m_currentCommand(NULL),
m_currentCaseId(-1)
{
m_errorMessageDialog = new QErrorMessage(RiuMainWindow::instance());
@ -307,3 +320,19 @@ void RiaSocketServer::slotReadyRead()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSocketServer::setCurrentCaseId(int caseId)
{
m_currentCaseId = caseId;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RiaSocketServer::currentCaseId() const
{
return m_currentCaseId;
}

View File

@ -52,6 +52,9 @@ public:
QErrorMessage* errorMessageDialog() { return m_errorMessageDialog; }
QTcpSocket* currentClient() { return m_currentClient; }
void setCurrentCaseId(int caseId);
int currentCaseId() const;
private slots:
void slotNewClientConnection();
void slotCurrentClientDisconnected();
@ -69,5 +72,6 @@ private:
qint64 m_currentCommandSize; ///< The size in bytes of the command we are currently reading.
RiaSocketCommand* m_currentCommand;
};
int m_currentCaseId; // Set to -1 to use default server behavior
};