ProtoZed  awesome branch
A simple but powerful game framework
Public Member Functions | Protected Member Functions | List of all members
PZ::System Class Referenceabstract

A system. More...

Inheritance diagram for PZ::System:
PZ::NonCopyable PZ::EventHandler PZ::Input PZ::Input2 PZ::Renderer PZ::Sound

Public Member Functions

 System (const SystemType &type, Application &application)
 
virtual ~System ()
 
virtual bool Start ()
 Starts the system.
 
virtual bool Stop ()
 Stops the system.
 
virtual void Update (float deltaTime)=0
 Runs an update.
 
const SystemTypeGetType () const
 Gets the type.
 
bool IsStarted () const
 
- Public Member Functions inherited from PZ::EventHandler
 EventHandler ()
 
virtual ~EventHandler ()
 
bool SubscribeTo (EventHandler &handler)
 
bool UnsubscribeTo (EventHandler &handler)
 
template<class T , class EventT >
bool RegisterEvent (T *obj, void(T::*memFn)(EventT &))
 
template<class T , class EventT >
bool UnregisterEvent (T *obj, void(T::*memFn)(EventT &))
 
void HandleEvent (const Event &e)
 
void EmitEvent (const Event &e) const
 

Protected Member Functions

ApplicationGetApplication () const
 
- Protected Member Functions inherited from PZ::NonCopyable
 NonCopyable ()
 

Detailed Description

A system.

This is something that will run every frame and do some work.

Constructor & Destructor Documentation

PZ::System::System ( const SystemType type,
Application application 
)
inline
virtual PZ::System::~System ( )
inlinevirtual

Member Function Documentation

Application& PZ::System::GetApplication ( ) const
inlineprotected
const SystemType& PZ::System::GetType ( ) const
inline

Gets the type.

Returns
The type.
bool PZ::System::IsStarted ( ) const
inline
virtual bool PZ::System::Start ( )
inlinevirtual

Starts the system.

Returns
true if it succeeds, false if it fails.

Reimplemented in PZ::Renderer, and PZ::Sound.

virtual bool PZ::System::Stop ( )
inlinevirtual

Stops the system.

Returns
true if it succeeds, false if it fails.

Reimplemented in PZ::Renderer, and PZ::Sound.

virtual void PZ::System::Update ( float  deltaTime)
pure virtual

Runs an update.

Parameters
deltaTimeTime since the last frame.

Implemented in PZ::Input, PZ::Input2, PZ::Renderer, and PZ::Sound.


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