1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <functional>
- class Item;
- class ItemType;
- class ItemFilter : public virtual Framework::ReferenceCounter
- {
- public:
- ItemFilter();
- virtual bool matchItem(const Item* zItem) const = 0;
- };
- class CombinedItemFilter : public ItemFilter
- {
- private:
- ItemFilter* filterA;
- ItemFilter* filterB;
- std::function<bool(bool, bool)> op;
- public:
- CombinedItemFilter(ItemFilter* filterA, ItemFilter* filterB, std::function<bool(bool, bool)> op);
- bool matchItem(const Item* zItem) const override;
- };
- class AnyItemFilter : public ItemFilter
- {
- public:
- AnyItemFilter();
- bool matchItem(const Item* zItem) const override;
- };
- class TypeItemFilter : public ItemFilter
- {
- private:
- const ItemType* zType;
- public:
- TypeItemFilter(const ItemType* zType);
- bool matchItem(const Item* zItem) const override;
- };
|