MethanePowered / MethaneKit

🎲 Modern 3D graphics made simple with C++17 cross-platform framework and rendering abstraction API on top of DirectX 12, Metal & Vulkan
Apache License 2.0
880 stars 54 forks source link

Events interface connection between classes #60

Closed egorodet closed 4 years ago

egorodet commented 4 years ago

Implement Emitter<IEventType> and Receiver<IEventType> template classes accepting event functions interface IEventType to be used for connected calls between objects emitter.connect(receiver) in effective and elegant way emitter.Emit(&IEventType::Foo) - which in turns calls Receiver::Foo for all connected receivers. Events module should be covered with unit tests.