Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Events::Subject Class Reference

Class for a subject that an observer would observe for changes. More...

#include <subject.h>

Inheritance diagram for Events::Subject:
Component Input::InputSystem Script::ScriptObject Utility::DebugParser Utility::FPSCounter Game::SpriteMovement Graphics::Camera Graphics::Light Graphics::Renderable Graphics::TileAnimator< StateType > Graphics::UI::Text Physics::CollisionData Sound::SoundInstance

Public Member Functions

virtual ~Subject ()=default
 
virtual void notify (std::shared_ptr< Event > event)
 notify is used to tell observers of an event. More...
 
virtual void notifyNow (std::shared_ptr< Event > event)
 notifyNow is used to tell observers of an event as an interrupt. More...
 
virtual void addObserver (std::shared_ptr< Observer > observer)
 Adds an observer. More...
 
virtual void removeObserver (std::shared_ptr< Observer > observer)
 Removes an observer. More...
 

Detailed Description

Class for a subject that an observer would observe for changes.

Constructor & Destructor Documentation

virtual Events::Subject::~Subject ( )
virtualdefault

Member Function Documentation

void Events::Subject::addObserver ( std::shared_ptr< Observer observer)
virtual

Adds an observer.

Parameters
[in]observerThe observer

Referenced by generated::getSubjectModule().

void Events::Subject::removeObserver ( std::shared_ptr< Observer observer)
virtual

Removes an observer.

Parameters
[in]observerThe observer

Referenced by generated::getSubjectModule().


The documentation for this class was generated from the following files: