mirror of https://github.com/CGAL/cgal
evil hack for vc
This commit is contained in:
parent
be0fceee50
commit
cee30d20e0
|
|
@ -74,6 +74,8 @@ int main(int, char *[])
|
||||||
|
|
||||||
std::ifstream in("data/points_2");
|
std::ifstream in("data/points_2");
|
||||||
in >> *tr.active_points_2_table_handle();
|
in >> *tr.active_points_2_table_handle();
|
||||||
|
std::cout << "Read " << tr.active_points_2_table_handle()->size()
|
||||||
|
<< " points" << std::endl;
|
||||||
|
|
||||||
tr.simulator_handle()->set_current_time(tr.simulator_handle()->end_time());
|
tr.simulator_handle()->set_current_time(tr.simulator_handle()->end_time());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,25 @@
|
||||||
#include <CGAL/Kinetic/Listener.h>
|
#include <CGAL/Kinetic/Listener.h>
|
||||||
#include <CGAL/Kinetic/Ref_counted.h>
|
#include <CGAL/Kinetic/Ref_counted.h>
|
||||||
|
|
||||||
|
template <typename H>
|
||||||
|
struct Listener_interface_impl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef enum Notification_type {DATA_CHANGED}
|
||||||
|
Notification_type;
|
||||||
|
typedef H Notifier_handle;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct Notifier: public CGAL::Kinetic::Ref_counted<Notifier>
|
struct Notifier: public CGAL::Kinetic::Ref_counted<Notifier>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Notifier(): data_(0), listener_(NULL){}
|
Notifier(): data_(0), listener_(NULL){}
|
||||||
|
|
||||||
struct Listener_interface
|
typedef CGAL::Kinetic::Ref_counted<Notifier> Base;
|
||||||
{
|
typedef Listener_interface_impl<typename Base::Handle> Listener_interface;
|
||||||
public:
|
|
||||||
typedef enum Notification_type {DATA_CHANGED}
|
|
||||||
Notification_type;
|
|
||||||
typedef Notifier::Handle Notifier_handle;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef CGAL::Kinetic::Listener<Listener_interface> Listener;
|
typedef CGAL::Kinetic::Listener<Listener_interface> Listener;
|
||||||
friend class CGAL::Kinetic::Listener<Listener_interface>;
|
|
||||||
friend class Listener_interface;
|
|
||||||
|
|
||||||
int data() const {return data_;}
|
int data() const {return data_;}
|
||||||
void set_data(int d) {
|
void set_data(int d) {
|
||||||
|
|
@ -75,3 +78,4 @@ int main(int, char *[])
|
||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue