penguins  1.0.0
BotTurnController Class Referenceabstract
Inheritance diagram for BotTurnController:
[legend]

Detailed Description

Definition at line 66 of file controllers.hh.

Public Member Functions

 BotTurnController (GamePanel *panel)
 
virtual ~BotTurnController ()
 
virtual void configure_bot_turn_ui () override
 
virtual void on_activated () override
 
virtual void on_deactivated (GameController *next_controller) override
 
virtual void update_tile_attributes () override
 
virtual void update_status_bar () override
 
virtual void on_mouse_up (wxMouseEvent &event) override
 
virtual BotThreadcreate_bot_thread ()=0
 
void on_bot_thread_done_work (bool cancelled)
 
void start_bot_thread ()
 
void stop_bot_thread ()
 
void unregister_bot_thread (BotThread *thread)
 
- Public Member Functions inherited from GameController
 GameController (GamePanel *panel)
 
virtual ~GameController ()
 
void update_game_state_and_indirectly_delete_this ()
 
virtual void configure_log_viewer_ui ()
 
virtual void paint_overlay (wxDC &dc)
 
virtual void on_mouse_enter_leave (wxMouseEvent &event)
 
virtual void on_mouse_down (wxMouseEvent &event)
 
virtual void on_mouse_move (wxMouseEvent &event)
 
- Public Member Functions inherited from wxEvtHandler
virtual void QueueEvent (wxEvent *event)
 
virtual void AddPendingEvent (const wxEvent &event)
 
void CallAfter (void(T::*method)(T1,...), T1 x1,...)
 
void CallAfter (const T &functor)
 
virtual bool ProcessEvent (wxEvent &event)
 
bool ProcessEventLocally (wxEvent &event)
 
bool SafelyProcessEvent (wxEvent &event)
 
void ProcessPendingEvents ()
 
void DeletePendingEvents ()
 
void Connect (int id, int lastId, wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
void Connect (int id, wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
void Connect (wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
bool Disconnect (wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
bool Disconnect (int id=wxID_ANY, wxEventType eventType=wxEVT_NULL, wxObjectEventFunction function=NULL, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
bool Disconnect (int id, int lastId, wxEventType eventType, wxObjectEventFunction function=NULL, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
void Bind (const EventTag &eventType, Functor functor, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
void Bind (const EventTag &eventType, void(Class::*method)(EventArg &), EventHandler *handler, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
bool Unbind (const EventTag &eventType, Functor functor, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
bool Unbind (const EventTag &eventType, void(Class::*method)(EventArg &), EventHandler *handler, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
void * GetClientData () const
 
wxClientDataGetClientObject () const
 
void SetClientData (void *data)
 
void SetClientObject (wxClientData *data)
 
bool GetEvtHandlerEnabled () const
 
wxEvtHandlerGetNextHandler () const
 
wxEvtHandlerGetPreviousHandler () const
 
void SetEvtHandlerEnabled (bool enabled)
 
virtual void SetNextHandler (wxEvtHandler *handler)
 
virtual void SetPreviousHandler (wxEvtHandler *handler)
 
void Unlink ()
 
bool IsUnlinked () const
 
 wxEvtHandler ()
 
virtual ~wxEvtHandler ()
 
virtual void QueueEvent (wxEvent *event)
 
virtual void AddPendingEvent (const wxEvent &event)
 
void CallAfter (void(T::*method)(T1,...), T1 x1,...)
 
void CallAfter (const T &functor)
 
virtual bool ProcessEvent (wxEvent &event)
 
bool ProcessEventLocally (wxEvent &event)
 
bool SafelyProcessEvent (wxEvent &event)
 
void ProcessPendingEvents ()
 
void DeletePendingEvents ()
 
void Connect (int id, int lastId, wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
void Connect (int id, wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
void Connect (wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
bool Disconnect (wxEventType eventType, wxObjectEventFunction function, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
bool Disconnect (int id=wxID_ANY, wxEventType eventType=wxEVT_NULL, wxObjectEventFunction function=NULL, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
bool Disconnect (int id, int lastId, wxEventType eventType, wxObjectEventFunction function=NULL, wxObject *userData=NULL, wxEvtHandler *eventSink=NULL)
 
void Bind (const EventTag &eventType, Functor functor, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
void Bind (const EventTag &eventType, void(Class::*method)(EventArg &), EventHandler *handler, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
bool Unbind (const EventTag &eventType, Functor functor, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
bool Unbind (const EventTag &eventType, void(Class::*method)(EventArg &), EventHandler *handler, int id=wxID_ANY, int lastId=wxID_ANY, wxObject *userData=NULL)
 
void * GetClientData () const
 
wxClientDataGetClientObject () const
 
void SetClientData (void *data)
 
void SetClientObject (wxClientData *data)
 
bool GetEvtHandlerEnabled () const
 
wxEvtHandlerGetNextHandler () const
 
wxEvtHandlerGetPreviousHandler () const
 
void SetEvtHandlerEnabled (bool enabled)
 
virtual void SetNextHandler (wxEvtHandler *handler)
 
virtual void SetPreviousHandler (wxEvtHandler *handler)
 
void Unlink ()
 
bool IsUnlinked () const
 
- Public Member Functions inherited from wxObject
 wxObject ()
 
 wxObject (const wxObject &other)
 
virtual ~wxObject ()
 
virtual wxClassInfoGetClassInfo () const
 
wxObjectRefDataGetRefData () const
 
bool IsKindOf (const wxClassInfo *info) const
 
bool IsSameAs (const wxObject &obj) const
 
void Ref (const wxObject &clone)
 
void SetRefData (wxObjectRefData *data)
 
void UnRef ()
 
void UnShare ()
 
void operator delete (void *buf)
 
void * operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
 

Data Fields

bool executing_bot_turn = false
 
wxCriticalSection bot_thread_cs
 
BotThreadbot_thread = nullptr
 
- Data Fields inherited from GameController
GamePanelpanel
 
CanvasPanelcanvas
 
Gamegame
 
std::shared_ptr< BotParameters > & bot_params
 

Additional Inherited Members

- Static Public Member Functions inherited from wxEvtHandler
static void AddFilter (wxEventFilter *filter)
 
static void RemoveFilter (wxEventFilter *filter)
 
static void AddFilter (wxEventFilter *filter)
 
static void RemoveFilter (wxEventFilter *filter)
 
- Protected Member Functions inherited from wxEvtHandler
virtual bool TryBefore (wxEvent &event)
 
virtual bool TryAfter (wxEvent &event)
 
- Protected Member Functions inherited from wxObject
void AllocExclusive ()
 
virtual wxObjectRefDataCreateRefData () const
 
virtual wxObjectRefDataCloneRefData (const wxObjectRefData *data) const
 
- Protected Attributes inherited from wxObject
wxObjectRefDatam_refData
 

Field Documentation

◆ executing_bot_turn

bool BotTurnController::executing_bot_turn = false

◆ bot_thread_cs

wxCriticalSection BotTurnController::bot_thread_cs

Definition at line 84 of file controllers.hh.

Referenced by start_bot_thread(), stop_bot_thread(), and unregister_bot_thread().

◆ bot_thread

BotThread* BotTurnController::bot_thread = nullptr

Definition at line 85 of file controllers.hh.

Referenced by start_bot_thread(), stop_bot_thread(), and unregister_bot_thread().

Constructor & Destructor Documentation

◆ BotTurnController()

BotTurnController::BotTurnController ( GamePanel panel)
inline

Definition at line 68 of file controllers.hh.

◆ ~BotTurnController()

BotTurnController::~BotTurnController ( )
virtual

Definition at line 89 of file controllers.cc.

Member Function Documentation

◆ configure_bot_turn_ui()

void BotTurnController::configure_bot_turn_ui ( )
overridevirtual

Reimplemented from GameController.

Definition at line 68 of file controllers.cc.

◆ on_activated()

void BotTurnController::on_activated ( )
overridevirtual

Reimplemented from GameController.

Definition at line 80 of file controllers.cc.

Referenced by on_mouse_up().

◆ on_deactivated()

void BotTurnController::on_deactivated ( GameController next_controller)
overridevirtual

Reimplemented from GameController.

Definition at line 85 of file controllers.cc.

◆ update_tile_attributes()

void BotTurnController::update_tile_attributes ( )
overridevirtual

Reimplemented from GameController.

Definition at line 217 of file controllers.cc.

◆ update_status_bar()

void BotTurnController::update_status_bar ( )
overridevirtual

Reimplemented from GameController.

Definition at line 338 of file controllers.cc.

◆ on_mouse_up()

void BotTurnController::on_mouse_up ( wxMouseEvent event)
overridevirtual

Reimplemented from GameController.

Definition at line 422 of file controllers.cc.

◆ create_bot_thread()

virtual BotThread* BotTurnController::create_bot_thread ( )
pure virtual

◆ on_bot_thread_done_work()

void BotTurnController::on_bot_thread_done_work ( bool  cancelled)

Definition at line 93 of file controllers.cc.

Referenced by BotPlacementThread::Entry(), and BotMovementThread::Entry().

◆ start_bot_thread()

void BotTurnController::start_bot_thread ( )

Definition at line 102 of file controllers.cc.

Referenced by on_activated().

◆ stop_bot_thread()

void BotTurnController::stop_bot_thread ( )

Definition at line 115 of file controllers.cc.

Referenced by on_deactivated(), and ~BotTurnController().

◆ unregister_bot_thread()

void BotTurnController::unregister_bot_thread ( BotThread thread)

Definition at line 134 of file controllers.cc.

Referenced by BotThread::OnExit().


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