Update NullObjects.hpp with the updated interfaces from commits and
@@ -29,6 +29,14 @@ namespace ARIASDK_NS_BEGIN
virtual void SetCustomField(const std::string &, const EventProperty &) override {};
};
+ class NullEventFilterCollection : public IEventFilterCollection
+ {
+ virtual void RegisterEventFilter(std::unique_ptr<IEventFilter>&&) override { }
+ virtual void UnregisterEventFilter(const char*) override { }
+ virtual void UnregisterAllFilters() noexcept override { }
+ virtual bool CanEventPropertiesBeSent(const EventProperties&) const noexcept override { return false; }
+ };
+
class NullLogger : public ILogger
{
@@ -103,10 +111,16 @@ namespace ARIASDK_NS_BEGIN
virtual void LogUserState(UserState state, long timeToLiveInMillis, EventProperties const & properties) override {};
+ virtual IEventFilterCollection& GetEventFilters() noexcept override { return m_filters; }
+
+ virtual IEventFilterCollection const& GetEventFilters() const noexcept { return m_filters; }
+
virtual void SetParentContext(ISemanticContext * context) override {};
virtual void SetLevel(uint8_t level) override {};
+ private:
+ NullEventFilterCollection m_filters;
};
class NullLogManager : public ILogManager
@@ -291,10 +305,22 @@ namespace ARIASDK_NS_BEGIN
return nullptr;
}
+ virtual IEventFilterCollection& GetEventFilters() noexcept override
+ {
+ return m_filters;
+ }
+
+ virtual const IEventFilterCollection& GetEventFilters() const noexcept override
+ {
+ return m_filters;
+ }
+
virtual void SetLevelFilter(uint8_t defaultLevel, uint8_t levelMin, uint8_t levelMax) override {};
virtual void SetLevelFilter(uint8_t defaultLevel, const std::set<uint8_t>& allowedLevels) override {};
+ private:
+ NullEventFilterCollection m_filters;
};
} ARIASDK_NS_END
