2017-07-20 06:08:49 +02:00
|
|
|
/*
|
|
|
|
* mock_BonusBearer.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-04-30 19:34:25 +02:00
|
|
|
#include "../../lib/bonuses/BonusList.h"
|
2023-05-01 19:29:53 +02:00
|
|
|
#include "../../lib/bonuses/Bonus.h"
|
2023-04-30 18:13:55 +02:00
|
|
|
#include "../../lib/bonuses/IBonusBearer.h"
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
class BonusBearerMock : public IBonusBearer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BonusBearerMock();
|
|
|
|
virtual ~BonusBearerMock();
|
|
|
|
|
|
|
|
void addNewBonus(const std::shared_ptr<Bonus> & b);
|
|
|
|
|
2024-08-25 12:44:11 +02:00
|
|
|
TConstBonusListPtr getAllBonuses(const CSelector & selector, const CSelector & limit, const std::string & cachingStr = "") const override;
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
int64_t getTreeVersion() const override;
|
|
|
|
private:
|
|
|
|
mutable BonusList bonuses;
|
|
|
|
|
|
|
|
mutable int64_t cachedLast;
|
|
|
|
int32_t treeVersion;
|
|
|
|
};
|