63 lines
1.1 KiB
C++
Executable File
63 lines
1.1 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Some helper classes / functions for AES
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#include "aes_helper.h"
|
|
|
|
#include <QHash>
|
|
#include <QSet>
|
|
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
|
|
//
|
|
// class HandledImpactsStorage::Private
|
|
//
|
|
class HandledImpactsStorage::Private
|
|
{
|
|
public:
|
|
Private() = default;
|
|
~Private() = default;
|
|
|
|
// data:
|
|
QHash<int, QSet<int>> m_aesItemId2Index; // Key = aesItemId ; processed/calculated index
|
|
};
|
|
|
|
|
|
//
|
|
// class HandledImpactsStorage
|
|
//
|
|
HandledImpactsStorage::HandledImpactsStorage()
|
|
: d(new Private)
|
|
{}
|
|
|
|
HandledImpactsStorage::~HandledImpactsStorage()
|
|
{
|
|
delete d;
|
|
}
|
|
|
|
void HandledImpactsStorage::setIndexProcessed(int aesItemId, int index)
|
|
{
|
|
d->m_aesItemId2Index[aesItemId].insert(index);
|
|
}
|
|
|
|
bool HandledImpactsStorage::isIndexProcessed(int aesItemId, int index)
|
|
{
|
|
return d->m_aesItemId2Index[aesItemId].contains(index);
|
|
}
|
|
|
|
void HandledImpactsStorage::removeAesItem(int aesItemId)
|
|
{
|
|
d->m_aesItemId2Index.remove(aesItemId);
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
} // namespace AreaEffectSimulation
|