![]() |
FastEngine 0.9.5
A multiplayer oriented 2D engine made with Vulkan.
|
Public Types | |
| using | SubscriberCount = unsigned int |
Protected Member Functions | |
| virtual void | onDetach (fge::Subscriber *subscriber)=0 |
| Callback called when a subscriber is detached. | |
| virtual void | detachAll ()=0 |
| Detach all subscribers. | |
| virtual bool | detach (fge::Subscriber *subscriber)=0 |
| Detach a specific subscriber. | |
| virtual SubscriberCount | detachOnce (fge::Subscriber *subscriber)=0 |
| Detach only once a specific subscriber. | |
| virtual SubscriberCount | attach (fge::Subscriber *subscriber)=0 |
| Attach a specific subscriber. | |
| virtual SubscriberCount | getCount (fge::Subscriber *subscriber) const =0 |
| Get the SubscriberCount of a specific subscriber. | |
Friends | |
| class | fge::Subscriber |
|
protectedpure virtual |
Attach a specific subscriber.
You can't directly attach a nullptr global scope subscriber. But if you do, this function will do nothing and return 1 as the SubscriberCount.
| subscriber | The subscriber to attach |
Implemented in fge::Subscription, and fge::UniqueSubscription.
|
protectedpure virtual |
Detach a specific subscriber.
Detaching a nullptr global scope subscriber will do nothing.
| subscriber | The subscriber to detach |
Implemented in fge::Subscription, and fge::UniqueSubscription.
|
protectedpure virtual |
Detach all subscribers.
Implemented in fge::Subscription, and fge::UniqueSubscription.
|
protectedpure virtual |
Detach only once a specific subscriber.
You can attach a subscriber multiple times, and it will augment the SubscriberCount. This function will only detach one time the subscriber and decrement the SubscriberCount. If the SubscriberCount is 0, the subscriber will be detached.
| subscriber | The subscriber to detach |
Implemented in fge::Subscription, and fge::UniqueSubscription.
|
nodiscardprotectedpure virtual |
Get the SubscriberCount of a specific subscriber.
| subscriber | The subscriber to get the SubscriberCount |
Implemented in fge::Subscription, and fge::UniqueSubscription.
|
protectedpure virtual |
Callback called when a subscriber is detached.
The subscriber, at this point, can't be nullptr.
| subscriber | The subscriber that was detached |
Implemented in fge::CallbackHandler< Types >, fge::CallbackHandler< ClientSharedPtr const & >, fge::CallbackHandler< ClientSharedPtr const &, fge::net::Identity const & >, fge::CallbackHandler< ClientSharedPtr, fge::net::Identity const & >, fge::CallbackHandler< Event >, fge::CallbackHandler< fge::Event const &, SDL_AudioDeviceEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_CommonEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_ControllerAxisEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_ControllerButtonEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_ControllerDeviceEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_DollarGestureEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_DropEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_EventType, fge::GuiElementContext & >, fge::CallbackHandler< fge::Event const &, SDL_JoyAxisEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_JoyBallEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_JoyButtonEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_JoyDeviceEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_JoyHatEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_KeyboardEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_MouseButtonEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_MouseButtonEvent const &, fge::GuiElementContext & >, fge::CallbackHandler< fge::Event const &, SDL_MouseMotionEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_MouseMotionEvent const &, fge::GuiElementContext & >, fge::CallbackHandler< fge::Event const &, SDL_MouseWheelEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_MouseWheelEvent const &, fge::GuiElementContext & >, fge::CallbackHandler< fge::Event const &, SDL_MultiGestureEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_QuitEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_SysWMEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_TextEditingEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_TextInputEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_TouchFingerEvent const & >, fge::CallbackHandler< fge::Event const &, SDL_WindowEvent const & >, fge::CallbackHandler< fge::GuiElementHandler const &, fge::Vector2f const & >, fge::CallbackHandler< fge::net::Client & >, fge::CallbackHandler< fge::net::ClientSideNetUdp & >, fge::CallbackHandler< fge::net::ClientSideNetUdp &, TransmitPacketPtr & >, fge::CallbackHandler< fge::ObjButton * >, fge::CallbackHandler< fge::ObjSelectBox &, std::size_t >, fge::CallbackHandler< fge::ObjTextInputBox & >, fge::CallbackHandler< fge::ObjWindow & >, fge::CallbackHandler< fge::Scene & >, fge::CallbackHandler< fge::Scene &, fge::ObjectDataShared const & >, fge::CallbackHandler< fge::Scene &, fge::ObjectPlan >, fge::CallbackHandler< fge::Scene const &, fge::RenderTarget & >, fge::CallbackHandler< fge::TaskHandler & >, fge::CallbackHandler< fge::Timer & >, fge::CallbackHandler< fge::Vector2f const & >, fge::CallbackHandler< float >, fge::UniqueCallbackHandler< Types >, fge::UniqueCallbackHandler< ClientSharedPtr const &, fge::net::Identity const & >, fge::UniqueCallbackHandler< ClientSharedPtr const &, fge::net::Identity const &, ReceivedPacketPtr const & >, fge::UniqueCallbackHandler< ClientSharedPtr const &, fge::net::Identity const &, uint16_t >, fge::UniqueCallbackHandler< ClientSharedPtr const &, fge::net::Identity const &, uint16_t, ObjectSid, ObjectSid, ReceivedPacketPtr const & >, and fge::UniqueCallbackHandler< ClientSharedPtr const &, fge::net::Identity const &, uint16_t, ReceivedPacketPtr const & >.