Files
OpenVulkano/openVulkanoCpp/Host/Apple/NamedEventProcessor.h
2024-07-30 08:14:01 +02:00

30 lines
966 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "Base/Event.hpp"
namespace OpenVulkano
{
class NamedEventProcessor final : public INamedEventProcessor
{
std::vector<std::string> m_classNamePrefixes, m_classNameSuffixes;
bool m_useClassNameAsEventName;
public:
NamedEventProcessor(bool classNameAsEventName = false)
: m_classNamePrefixes({ "", "Event" })
, m_classNameSuffixes({ "Event", "" })
, m_useClassNameAsEventName(classNameAsEventName)
{}
void RegisterClassNamePrefix(const std::string& prefix) { m_classNamePrefixes.push_back(prefix); }
void RegisterClassNameSuffix(const std::string& suffix) { m_classNameSuffixes.push_back(suffix); }
void Notify(const std::string& eventName, const std::vector<Parameters>& parameters) const override;
};
}