new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
60 lines
2.0 KiB
C++
Executable File
60 lines
2.0 KiB
C++
Executable File
/**
|
|
* The Party class represents a party. It holds the data and offers some conversion methods.
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hannes Baeuerle, SLSE, 2016-05-12
|
|
*/
|
|
|
|
#include "party.h"
|
|
|
|
bool ParticipantManagement::PartyHandling::Party::hasChanges(const ParticipantManagement::Party &request,
|
|
const bool bIgnoreIsUsedBy)
|
|
{
|
|
const QString requestProperties = QString::fromStdString(request.properties);
|
|
bool hasChanges = request.color != m_data.color
|
|
|| request.fadingColor != m_data.fadingColor
|
|
|| request.name != m_data.name.toStdString()
|
|
|| static_cast<int>(request.hlaForceIdentifier) != m_data.hlaForceIdentifier
|
|
|| request.role != m_data.roleId
|
|
|| requestProperties != m_data.properties;
|
|
if (!bIgnoreIsUsedBy && !hasChanges)
|
|
hasChanges = request.isUsedBy != m_data.isUsedBy;
|
|
|
|
if (hasChanges)
|
|
{
|
|
m_data.color = request.color;
|
|
m_data.fadingColor = request.fadingColor;
|
|
m_data.name = QString::fromStdString(request.name);
|
|
m_data.roleId = request.role;
|
|
m_data.hlaForceIdentifier = static_cast<int>(request.hlaForceIdentifier);
|
|
m_data.properties = requestProperties;
|
|
if (!bIgnoreIsUsedBy)
|
|
m_data.isUsedBy = request.isUsedBy;
|
|
}
|
|
|
|
return hasChanges;
|
|
}
|
|
|
|
ParticipantManagement::Database::PpmParty ParticipantManagement::PartyHandling::Party::toDbParty() const
|
|
{
|
|
return m_data;
|
|
}
|
|
|
|
ParticipantManagement::Party ParticipantManagement::PartyHandling::Party::toDdsParty() const
|
|
{
|
|
ParticipantManagement::Party result;
|
|
|
|
result.id = id();
|
|
result.color = m_data.color;
|
|
result.fadingColor = m_data.fadingColor;
|
|
result.name = m_data.name.toStdString();
|
|
result.role = m_data.roleId;
|
|
result.hlaForceIdentifier = static_cast<HlaForceIdentifierEnum>(m_data.hlaForceIdentifier);
|
|
result.isUsedBy = m_data.isUsedBy;
|
|
result.sampleTime = QDateTime::currentMSecsSinceEpoch();
|
|
result.properties = m_data.properties.toStdString();
|
|
|
|
return result;
|
|
}
|