mirror of https://github.com/CGAL/cgal
class vs struct fixed
This commit is contained in:
parent
0abe302c03
commit
1e531c4370
|
|
@ -29,11 +29,11 @@ LIBPATH = \
|
|||
|
||||
LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_LDFLAGS) -lboost_thread-mt
|
||||
$(CGAL_LDFLAGS)
|
||||
|
||||
QT_LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_LDFLAGS)
|
||||
$(CGAL_LDFLAGS)
|
||||
|
||||
CXXFLAGS_3D= $(CXXFLAGS)
|
||||
|
||||
|
|
|
|||
|
|
@ -89,10 +89,9 @@ public:
|
|||
//! construct things
|
||||
Qt_widget_2(int argc, char *argv[],
|
||||
typename Simulator::Handle sh,
|
||||
double xmin=-10,double xmax=10, double ymin=-10, double ymax=10):
|
||||
app_(new QApplication(argc, argv)),
|
||||
base_(new Graphical_base(sh)),
|
||||
window_l_(base_){
|
||||
double xmin=-10,double xmax=10, double ymin=-10, double ymax=10): app_(new QApplication(argc, argv)),
|
||||
base_(new Graphical_base(sh)),
|
||||
window_l_(base_){
|
||||
|
||||
app_->setMainWidget(new Qt_window(static_cast<int>(std::floor(xmin)),
|
||||
static_cast<int>(std::ceil(xmax)),
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ public:
|
|||
*/
|
||||
virtual void new_notification(typename Interface::Notification_type nt)=0;
|
||||
|
||||
struct Handle: public boost::noncopyable {
|
||||
class Handle: public boost::noncopyable {
|
||||
public:
|
||||
Handle(): p_(NULL){}
|
||||
Handle(LB_this *p):p_(p){}
|
||||
LB_this &operator*(){return *p_;}
|
||||
|
|
@ -249,7 +250,7 @@ private: \
|
|||
|
||||
#define CGAL_KINETIC_LISTEN1(Notifier, NOTIF, function)\
|
||||
private: \
|
||||
struct Notifier##_listener: public Notifier::Listener { \
|
||||
class Notifier##_listener: public Notifier::Listener { \
|
||||
CGAL_KINETIC_LISTENER_BASICS(Notifier##_listener, This); \
|
||||
public: \
|
||||
virtual void new_notification(typename Notifier::Listener::Notification_type t) { \
|
||||
|
|
@ -263,7 +264,7 @@ private: \
|
|||
|
||||
#define CGAL_KINETIC_LISTEN2(Notifier, NOTIF, function, NOTIF2, function2) \
|
||||
private: \
|
||||
struct Notifier##_listener: public Notifier::Listener { \
|
||||
class Notifier##_listener: public Notifier::Listener { \
|
||||
CGAL_KINETIC_LISTENER_BASICS(Notifier##_listener, This); \
|
||||
public: \
|
||||
virtual void new_notification(typename Notifier::Listener::Notification_type t) { \
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ private: \
|
|||
|
||||
|
||||
|
||||
#define CGAL_KINETIC_MULTILISTENER2(A,B) private: \
|
||||
#define CGAL_KINETIC_MULTILISTENER2(A,B) private: \
|
||||
struct Listener_core{ \
|
||||
typedef typename This::Handle Notifier_handle; \
|
||||
typedef enum {A,B} Notification_type; \
|
||||
|
|
|
|||
|
|
@ -22,31 +22,22 @@
|
|||
#ifndef CGAL_UTILITY_MACROS_H
|
||||
#define CGAL_UTILITY_MACROS_H
|
||||
|
||||
//#include <boost/call_traits.hpp>
|
||||
|
||||
/*namespace {
|
||||
class Semicolon_eater{};
|
||||
}*/
|
||||
|
||||
#define CGAL_EAT_SEMICOLON
|
||||
//friend class Semicolon_eater
|
||||
|
||||
#define CGAL_SUBSCRIPT(type, expr) type& operator[](unsigned int i){ expr;} \
|
||||
const type& operator[](unsigned int i) const { expr;} CGAL_EAT_SEMICOLON
|
||||
const type& operator[](unsigned int i) const { expr;}
|
||||
|
||||
#define CGAL_COPY_CONSTRUCTOR(TC) TC(const TC &o){copy_from(o);}\
|
||||
TC& operator=(const TC &o) {copy_from(o); return *this;} CGAL_EAT_SEMICOLON
|
||||
TC& operator=(const TC &o) {copy_from(o); return *this;}
|
||||
|
||||
//
|
||||
#define CGAL_GET(type, name, expr) const type & name() const{expr;} CGAL_EAT_SEMICOLON
|
||||
#define CGAL_GETOBJECT(UC, lc, expr) const UC & lc##_object() const {expr;} CGAL_EAT_SEMICOLON
|
||||
#define CGAL_GETNR(type, name, expr) type name() const{expr;} CGAL_EAT_SEMICOLON
|
||||
#define CGAL_GET(type, name, expr) const type & name() const{expr;}
|
||||
#define CGAL_GETOBJECT(UC, lc, expr) const UC & lc##_object() const {expr;}
|
||||
#define CGAL_GETNR(type, name, expr) type name() const{expr;}
|
||||
//#define CGAL_GET(type, name, expr) typename boost::call_traits<type>::param_type name() const {expr;}
|
||||
|
||||
#define CGAL_IS(name, expr) bool is_##name() const {expr;} CGAL_EAT_SEMICOLON
|
||||
#define CGAL_SET_IS(name, expr) void set_is_##name(bool tf) {expr;} CGAL_EAT_SEMICOLON
|
||||
#define CGAL_IS(name, expr) bool is_##name() const {expr;}
|
||||
#define CGAL_SET_IS(name, expr) void set_is_##name(bool tf) {expr;}
|
||||
|
||||
#define CGAL_SET(type, name, expr) void set_##name(const type &k) {expr;} CGAL_EAT_SEMICOLON
|
||||
#define CGAL_SET(type, name, expr) void set_##name(const type &k) {expr;}
|
||||
|
||||
template <class T>
|
||||
struct Utility_macros_param_type {
|
||||
|
|
@ -62,7 +53,7 @@ struct Utility_macros_param_type<T*> {
|
|||
|
||||
#define CGAL_FIELDRW(type, name, var) \
|
||||
Utility_macros_param_type<type>::R name() const {return var;} \
|
||||
void set_##name( Utility_macros_param_type<type>::P k) {var=k;} CGAL_EAT_SEMICOLON
|
||||
void set_##name( Utility_macros_param_type<type>::P k) {var=k;}
|
||||
|
||||
|
||||
#define CGAL_OUTPUT(type) \
|
||||
|
|
@ -85,29 +76,29 @@ struct Utility_macros_param_type<T*> {
|
|||
#define CGAL_ITERATOR(uc_name, lc_name, it_type, bexpr, eexpr) \
|
||||
typedef it_type uc_name##_iterator; \
|
||||
uc_name##_iterator lc_name##s_begin() {bexpr;} \
|
||||
uc_name##_iterator lc_name##s_end() {eexpr;} CGAL_EAT_SEMICOLON
|
||||
uc_name##_iterator lc_name##s_end() {eexpr;}
|
||||
|
||||
#define CGAL_CONST_ITERATOR(uc_name, lc_name, it_type, bexpr, eexpr) \
|
||||
typedef it_type uc_name##_const_iterator; \
|
||||
uc_name##_const_iterator lc_name##s_begin() const {bexpr;} \
|
||||
uc_name##_const_iterator lc_name##s_end() const {eexpr;} CGAL_EAT_SEMICOLON
|
||||
uc_name##_const_iterator lc_name##s_end() const {eexpr;}
|
||||
|
||||
#define CGAL_FIND(ucname, expr) \
|
||||
ucname##_const_iterator find(ucname##_key k) const {expr;} \
|
||||
ucname##_iterator find(ucname##_key k) {expr;} CGAL_EAT_SEMICOLON
|
||||
ucname##_iterator find(ucname##_key k) {expr;}
|
||||
|
||||
|
||||
#define CGAL_CONST_FIND(ucname, expr) \
|
||||
ucname##_const_iterator find(ucname##_key k) const {expr;} CGAL_EAT_SEMICOLON
|
||||
ucname##_const_iterator find(ucname##_key k) const {expr;}
|
||||
|
||||
#define CGAL_INSERT(ucname, expr) \
|
||||
ucname##_iterator insert(ucname##_key k, const ucname &m) {expr;} CGAL_EAT_SEMICOLON
|
||||
ucname##_iterator insert(ucname##_key k, const ucname &m) {expr;}
|
||||
|
||||
#define CGAL_INSERTNK(ucname, expr) \
|
||||
ucname##_iterator insert(const ucname &m) {expr;} CGAL_EAT_SEMICOLON
|
||||
ucname##_iterator insert(const ucname &m) {expr;}
|
||||
|
||||
#define CGAL_SIZE(lcname, expr) \
|
||||
size_t number_of_##lcname() const {expr;} CGAL_EAT_SEMICOLON
|
||||
size_t number_of_##lcname() const {expr;}
|
||||
|
||||
#define CGAL_SWAP(type) \
|
||||
inline void swap(type &a, type &b) { \
|
||||
|
|
@ -150,7 +141,7 @@ template <class A, class B> \
|
|||
} \
|
||||
bool operator<=(const This &o) const { \
|
||||
return compare(o) != CGAL::LARGER; \
|
||||
} CGAL_EAT_SEMICOLON
|
||||
}
|
||||
|
||||
#define CGAL_COMPARISONS_COMPARE bool operator==(const This &o) const { \
|
||||
return compare(o)==0; \
|
||||
|
|
@ -169,7 +160,7 @@ template <class A, class B> \
|
|||
} \
|
||||
bool operator<=(const This &o) const { \
|
||||
return compare(o) <= 0; \
|
||||
} CGAL_EAT_SEMICOLON
|
||||
}
|
||||
|
||||
|
||||
#define CGAL_COMPARISONS1(field) bool operator==(const This &o) const { \
|
||||
|
|
@ -189,7 +180,7 @@ template <class A, class B> \
|
|||
} \
|
||||
bool operator<=(const This &o) const { \
|
||||
return (field<= o.field); \
|
||||
} CGAL_EAT_SEMICOLON
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -214,7 +205,7 @@ template <class A, class B> \
|
|||
} \
|
||||
bool operator<=(const This &o) const { \
|
||||
return !operator>(o); \
|
||||
} CGAL_EAT_SEMICOLON
|
||||
}
|
||||
|
||||
#define CGAL_COMPARISONS3(a, b, c) \
|
||||
bool operator==(const This &o) const { \
|
||||
|
|
@ -242,7 +233,7 @@ template <class A, class B> \
|
|||
} \
|
||||
bool operator<=(const This &o) const { \
|
||||
return !operator>(o); \
|
||||
} CGAL_EAT_SEMICOLON
|
||||
}
|
||||
|
||||
#define CGAL_REAL_EMBEDDABLE_BODY \
|
||||
class Abs \
|
||||
|
|
|
|||
Loading…
Reference in New Issue