From 618bb2a7649a79396d818bdcefcc37b8674693cc Mon Sep 17 00:00:00 2001 From: Daniel Russel Date: Thu, 6 Mar 2008 07:12:04 +0000 Subject: [PATCH] cross packge dependencies with GETSET --- .../include/CGAL/Tools/utility_macros.h | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/Kinetic_data_structures/include/CGAL/Tools/utility_macros.h b/Kinetic_data_structures/include/CGAL/Tools/utility_macros.h index 6942018679c..e35cf42002c 100644 --- a/Kinetic_data_structures/include/CGAL/Tools/utility_macros.h +++ b/Kinetic_data_structures/include/CGAL/Tools/utility_macros.h @@ -30,7 +30,7 @@ // #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_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::param_type name() const {expr;} @@ -39,22 +39,9 @@ #define CGAL_SET(type, name, expr) void set_##name(const type &k) {expr;} -template -struct Utility_macros_param_type { - typedef const T& P; - typedef const T& R; -}; - -template -struct Utility_macros_param_type { - typedef T* P; - typedef T* R; -}; - -#define CGAL_FIELDRW(type, name, var) \ - Utility_macros_param_type::R name() const {return var;} \ - void set_##name( Utility_macros_param_type::P k) {var=k;} - +#define CGAL_GETSET(type, name, var) \ + CGAL_GET(type, name, return var) \ + CGAL_SET(type, name, var = k) #define CGAL_OUTPUT(type) \ inline std::ostream& operator<<(std::ostream&out, const type &t){ \