#include <CGAL/Kinetic/basic.h>
#include <boost/utility.hpp>
Go to the source code of this file.
Classes |
class | Listener_base< Interface > |
| This is the base class for all listener objects. More...
|
class | Listener_base< Interface >::Handle |
Defines |
#define | CGAL_KINETIC_LISTENER1(A) |
#define | CGAL_KINETIC_LISTENERNT1(A) |
#define | CGAL_KINETIC_LISTENER2(A, B) |
#define | CGAL_KINETIC_LISTENERNT2(A, B) |
#define | CGAL_KINETIC_NOTIFY(field) if (listener_!= NULL) listener_->new_notification(Listener::field) |
#define | CGAL_KINETIC_LISTENER_DESTRUCTOR CGAL_assertion(listener_==NULL); |
#define | CGAL_KINETIC_LISTENER_BASICS(Name, KDS) |
#define | CGAL_KINETIC_LISTEN1(Notifier, NOTIF, function) |
#define | CGAL_KINETIC_LISTEN2(Notifier, NOTIF, function, NOTIF2, function2) |
#define | CGAL_KINETIC_NOTIFIER(Notifier) listener_##Notifier##_.notifier() |
#define | CGAL_KINETIC_INIT_LISTEN(Notifier, ptr) |
Define Documentation
Value:listener_##Notifier##_.set_recipient(this); \
listener_##Notifier##_.set_notifier(ptr);
Value:private: \
class Notifier##_listener: public Notifier::Listener { \
CGAL_KINETIC_LISTENER_BASICS(Notifier##_listener, This); \
public: \
virtual void new_notification(typename Notifier::Listener::Notification_type t) { \
if (recipient() != NULL && t== Notifier::Listener::NOTIF) recipient()->function; \
else { \
} \
} \
}; \
friend class Notifier##_listener; \
Notifier##_listener listener_##Notifier##_;
Value:private: \
class Notifier##_listener: public Notifier::Listener { \
CGAL_KINETIC_LISTENER_BASICS(Notifier##_listener, This); \
public: \
virtual void new_notification(typename Notifier::Listener::Notification_type t) { \
if (recipient()== NULL) return; \
if (t== Notifier::Listener::NOTIF) recipient()->function(); \
else if (t== Notifier::Listener::NOTIF2) recipient()->function2; \
else { \
} \
} \
}; \
friend class Notifier##_listener; \
Notifier##_listener listener_##Notifier##_;
Value:private: \
struct Listener_core{ \
typedef This Notifier; \
typedef enum {A} Notification_type; \
}; \
public: \
typedef CGAL::Kinetic::Listener_base<Listener_core> Listener; \
friend class CGAL::Kinetic::Listener_base<Listener_core>; \
private: \
void set_listener(Listener *sk) { \
listener_=sk; \
} \
Listener* listener() {return listener_.get();} \
typename Listener::Handle listener_;
Value:private: \
struct Listener_core{ \
typedef This Notifier; \
typedef enum {A,B} Notification_type; \
}; \
public: \
typedef CGAL::Kinetic::Listener_base<Listener_core> Listener; \
friend class CGAL::Kinetic::Listener_base<Listener_core>; \
private: \
void set_listener(Listener *sk) { \
listener_=sk; \
} \
Listener* listener() {return listener_.get();} \
typename Listener::Handle listener_;
Value:public: \
Name(): recipient_(NULL){} \
typedef KDS Recipient; \
Recipient* recipient() const {return recipient_;} \
void set_recipient(Recipient *r){recipient_=r;} \
private: \
Recipient* recipient_;
Value:private: \
struct Listener_core{ \
typedef This Notifier; \
typedef enum {A} Notification_type; \
}; \
public: \
typedef CGAL::Kinetic::Listener_base<Listener_core> Listener; \
friend class CGAL::Kinetic::Listener_base<Listener_core>; \
private: \
void set_listener(Listener *sk) { \
listener_=sk; \
} \
Listener* listener() {return listener_.get();} \
Listener::Handle listener_;
Value:private: \
struct Listener_core{ \
typedef This Notifier; \
typedef enum {A,B} Notification_type; \
}; \
public: \
typedef CGAL::Kinetic::Listener_base<Listener_core> Listener; \
friend class CGAL::Kinetic::Listener_base<Listener_core>; \
private: \
void set_listener(Listener *sk) { \
listener_=sk; \
} \
Listener* listener() {return listener_.get();} \
Listener::Handle listener_;
#define CGAL_KINETIC_NOTIFY |
( |
|
field | ) |
if (listener_!= NULL) listener_->new_notification(Listener::field) |