Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+62
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @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
|
||||
Reference in new issue
Block a user