Ref T27, preparation for refactoring, turned private slots into normal member functions

* Motivation: slots no longer required, and in the driver the (small) slot overhead might matter
* renamed some members to better reflect future use
* timer intervals as constexpr
* fixed some typos and comments
This commit is contained in:
Klaus Basan
2017-06-22 01:24:40 +02:00
parent 5aaf5cdeb1
commit 6d26c96569
8 changed files with 134 additions and 58 deletions

View File

@@ -129,7 +129,7 @@ namespace BlackSimPlugin
return simObject.hasValidRequestAndObjectId() && objectId == simObject.getObjectId();
}
bool CSimConnectObjects::containsPendingAdd() const
bool CSimConnectObjects::containsPendingAdded() const
{
for (const CSimConnectObject &simObject : this->values())
{
@@ -138,6 +138,55 @@ namespace BlackSimPlugin
return false;
}
bool CSimConnectObjects::containsPendingRemoved() const
{
for (const CSimConnectObject &simObject : this->values())
{
if (simObject.isPendingRemoved()) { return true; }
}
return false;
}
int CSimConnectObjects::countPendingAdded() const
{
int c = 0;
for (const CSimConnectObject &simObject : this->values())
{
if (simObject.isPendingAdded()) { c++; }
}
return c;
}
int CSimConnectObjects::countPendingRemoved() const
{
int c = 0;
for (const CSimConnectObject &simObject : this->values())
{
if (simObject.isPendingRemoved()) { c++; }
}
return c;
}
CCallsignSet CSimConnectObjects::getPendingAddedCallsigns() const
{
CCallsignSet callsigns;
for (const CSimConnectObject &simObject : this->values())
{
if (simObject.isPendingAdded()) { callsigns.push_back(simObject.getCallsign()); }
}
return callsigns;
}
CCallsignSet CSimConnectObjects::getPendingRemovedCallsigns() const
{
CCallsignSet callsigns;
for (const CSimConnectObject &simObject : this->values())
{
if (simObject.isPendingRemoved()) { callsigns.push_back(simObject.getCallsign()); }
}
return callsigns;
}
void CSimConnectObjects::toggleInterpolatorModes()
{
for (const CCallsign &cs : this->keys())