signals 2.0
This commit is contained in:
1 parent
b849d8c7ce
commit
ef1b465179
33 files changed
+537
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#ifndef __signal_base_h__
|
||||
#define __signal_base_h__
|
||||
|
||||
#include "slot_base.h"
|
||||
|
||||
class signal_base
|
||||
{
|
||||
public:
|
||||
|
||||
signal_base();
|
||||
virtual ~signal_base();
|
||||
|
||||
protected:
|
||||
|
||||
bool bind(const slot_base& slot);
|
||||
bool unbind(const slot_base& slot);
|
||||
|
||||
// TEMP HACK private:
|
||||
|
||||
// linked list data structure
|
||||
struct list_node
|
||||
{
|
||||
slot_base slot;
|
||||
list_node* prev;
|
||||
list_node* next;
|
||||
};
|
||||
list_node* head;
|
||||
list_node* tail;
|
||||
|
||||
// linked list manipulation
|
||||
void clear_list();
|
||||
list_node* find_in_list(const slot_base& slot) const;
|
||||
bool add_to_list(const slot_base& slot);
|
||||
void remove_from_list(list_node* n);
|
||||
};
|
||||
|
||||
#endif // __signal_base_h__
|
||||
|
||||
Reference in new issue
Block a user