Skip to content

Commit

Permalink
add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_N…
Browse files Browse the repository at this point in the history
…AMESPACE and CGAL_END_NAMESPACE

by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
  • Loading branch information
sloriot committed Jun 9, 2010
1 parent aff0c71 commit 52317dd
Show file tree
Hide file tree
Showing 1,633 changed files with 3,356 additions and 3,335 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3097,6 +3097,7 @@ Scripts/developer_scripts/mirror_package_files.rb -text
Scripts/developer_scripts/mirror_package_impl.rb -text
Scripts/developer_scripts/remove_package_files_from_build_tree.rb -text
Scripts/developer_scripts/remove_package_files_from_build_tree_impl.rb -text
Scripts/developer_scripts/replace_CGAL_NAMESPACE.py -text
Scripts/developer_scripts/test_testsuite_submission -text
Scripts/scripts/cgal_create_cmake_script -text
Scripts/scripts/cgal_create_cmake_script_with_options -text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

// Opcode like

CGAL_BEGIN_NAMESPACE
namespace CGAL {

namespace internal {

Expand Down Expand Up @@ -94,6 +94,6 @@ bool do_intersect(const CGAL::Bbox_3& bbox,
}


CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_PLANE_3_DO_INTERSECT_H
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <CGAL/number_utils.h>


CGAL_BEGIN_NAMESPACE
namespace CGAL {

namespace internal {

Expand Down Expand Up @@ -111,6 +111,6 @@ bool do_intersect(const CGAL::Bbox_3& bbox,
return typename K::Do_intersect_3()(sphere, bbox);
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_SPHERE_3_DO_INTERSECT_H
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// ST: is this include really needed ?
#include <CGAL/internal/AABB_Intersections_3/Bbox_3_Plane_3_do_intersect.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

namespace internal {

Expand Down Expand Up @@ -283,6 +283,6 @@ bool do_intersect(const CGAL::Bbox_3& bbox,
return typename K::Do_intersect_3()(triangle, bbox);
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_DO_INTERSECT_H
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <numeric> // for std::accumulate

CGAL_BEGIN_NAMESPACE
namespace CGAL {

template< class T >
class Algebraic_extension_traits {
Expand Down Expand Up @@ -79,7 +79,7 @@ class Algebraic_extension_traits {
};
};

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // NiX_ALGEBRAIC_NUMBER_TRAITS_H
// EOF
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <CGAL/number_type_basic.h>
#include <CGAL/type_traits.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

// REMARK: Some of the following comments and references are just copy & pasted
// from EXACUS and have to be adapted/removed in the future.
Expand Down Expand Up @@ -602,6 +602,6 @@ namespace INTERN_AST {
}
};
} // INTERN_AST
CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_ALGEBRAIC_STRUCTURE_TRAITS_H
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/Coercion_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, NT )
}; \
};

CGAL_BEGIN_NAMESPACE
namespace CGAL {


namespace INTERN_CT{
Expand Down Expand Up @@ -236,6 +236,6 @@ template<class A , class B>
struct Coercion_traits :public Coercion_traits_for_level<A,B,CTL_TOP>{};


CGAL_END_NAMESPACE
} //namespace CGAL

#endif //NiX_COERCION_TRAITS_H
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/Fraction_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#include <CGAL/number_type_basic.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

/*! \ingroup NiX_Fraction_traits_spec
* \brief Traits class for accessing numerator and denominator.\n
Expand All @@ -62,7 +62,7 @@ class Fraction_traits {
typedef Null_functor Compose;
};

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_FRACTION_TRAITS_H
// EOF
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/Needs_parens_as_product.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <CGAL/IO/io.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

/*!
* oformat flag for parentheses if needed for a coefficient
Expand Down Expand Up @@ -97,6 +97,6 @@ template <> struct Needs_parens_as_product<long double>{
bool operator()(const long double& x){return x < (long double)(0);}
};

CGAL_END_NAMESPACE
} //namespace CGAL

#endif //CGAL_NEEDS_PARENTHESES_AS_PRODUCT_H
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/Rational_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <CGAL/number_type_basic.h>
#include <CGAL/Fraction_traits.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

namespace internal{

Expand Down Expand Up @@ -87,7 +87,7 @@ typename Fraction_traits<T>::Denominator_type
>::value >
{};

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_RATIONAL_TRAITS_H
// EOF
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/Real_embeddable_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <CGAL/number_type_basic.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

namespace INTERN_RET {

Expand Down Expand Up @@ -175,6 +175,6 @@ template< class Type_ >
class Real_embeddable_traits
: public INTERN_RET::Real_embeddable_traits_base<Type_,CGAL::Tag_false> {};

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_REAL_EMBEDDABLE_TRAITS_H
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/Scalar_factor_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/*! \file NiX/Scalar_factor_traits.h
* \brief Definition of traits class NiX::Scalar_factor_traits.
*/
CGAL_BEGIN_NAMESPACE
namespace CGAL {

/*! \nosubgrouping
* \ingroup NiX_Scalar_factor_traits_spec
Expand Down Expand Up @@ -157,7 +157,7 @@ scalar_factor(const NT& x,
}


CGAL_END_NAMESPACE
} //namespace CGAL

#endif // NiX_SCALAR_FACTOR_TRAITS_H
// EOF
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void check_result_type(CGAL::Null_functor, ResultType){}
typedef typename AST::Kth_root Kth_root; \
typedef typename AST::Root_of Root_of;

CGAL_BEGIN_NAMESPACE
namespace CGAL {

template< class AS >
bool test_equality_epsilon( const AS & a,
Expand Down Expand Up @@ -918,6 +918,6 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
!(::boost::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_TEST_ALGEBRAIC_STRUCTURE_H
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <cassert>

// These are test functions for the Coercion_traits
CGAL_BEGIN_NAMESPACE
namespace CGAL {

// this test implicit interoperable
template< class A, class B, class Type > void test_implicit_interoperable();
Expand Down Expand Up @@ -382,4 +382,4 @@ template <class FROM, class TO>
void test_explicit_interoperable_from_to(){
test_explicit_interoperable<FROM,TO,TO>();
}
CGAL_END_NAMESPACE
} //namespace CGAL
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifndef CGAL_TEST_FRACTION_TRAITS_H
#define CGAL_TEST_FRACTION_TRAITS_H

CGAL_BEGIN_NAMESPACE
namespace CGAL {

template <class T>
void test_fraction_traits(){
Expand Down Expand Up @@ -72,6 +72,6 @@ void test_fraction_traits(){
assert(common_factor(Den(-12),Den(-15)) == Den(3));
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_TEST_FRACTION_TRAITS_H
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifndef CGAL_TEST_RATIONAL_TRAITS_H
#define CGAL_TEST_RATIONAL_TRAITS_H

CGAL_BEGIN_NAMESPACE
namespace CGAL {

template <class Rational>
void test_rational_traits(){
Expand All @@ -50,6 +50,6 @@ void test_rational_traits(){
assert( x == Rational(7)/Rational(2));
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_TEST_RATIONAL_TRAITS_H
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#ifndef CGAL_TEST_REAL_EMBEDDABLE_H
#define CGAL_TEST_REAL_EMBEDDABLE_H

CGAL_BEGIN_NAMESPACE
namespace CGAL {

template<class Type, class ToDouble>
class Test_to_double {
Expand Down Expand Up @@ -291,6 +291,6 @@ void test_not_real_embeddable() {
// test_rounded_log2_abs(Type(0), F(), C());
//}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_TEST_REAL_COMPARABLE_H
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <CGAL/basic.h>
#include <vector>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

// EEA computing the normalized gcd
// Modern Computer Algebra (Hardcover)
Expand Down Expand Up @@ -72,6 +72,6 @@ AS extended_euclidean_algorithm(const AS& f, const AS& g, AS& s_, AS& t_){
return h;
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // NiX_EXTENDED_EUCLIDEAN_ALGORITHM_H //
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/ipower.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef CGAL_IPOWER_H
#define CGAL_IPOWER_H

CGAL_BEGIN_NAMESPACE
namespace CGAL {

template <typename NT>
inline
Expand Down Expand Up @@ -76,6 +76,6 @@ NT ipower(const NT& base, long expn) {
return res;
}

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_IPOWER_H
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/number_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <CGAL/number_type_basic.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {
CGAL_NTS_BEGIN_NAMESPACE


Expand Down Expand Up @@ -300,6 +300,6 @@ to_interval( const Real_embeddable& x) {


CGAL_NTS_END_NAMESPACE
CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_NUMBER_UTILS_H
4 changes: 2 additions & 2 deletions Algebraic_foundations/include/CGAL/number_utils_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <algorithm>
#include <utility>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

/* Defines functors:
- Is_zero
Expand Down Expand Up @@ -117,6 +117,6 @@ struct Compare



CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_NUMBER_UTILS_CLASSES_H
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <CGAL/NT_converter.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

// TODO :
// - FT converter ?
Expand Down Expand Up @@ -61,6 +61,6 @@ class Algebraic_kernel_converter {
}
};

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_CONVERTER_H
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h>
#include <CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h>

CGAL_BEGIN_NAMESPACE
namespace CGAL {

namespace AlgebraicFunctors {

Expand Down Expand Up @@ -221,6 +221,6 @@ namespace AlgebraicFunctors {

} // namespace AlgebraicFunctors

CGAL_END_NAMESPACE
} //namespace CGAL

#endif // CGAL_ALGEBRAIC_KERNEL_FOR_CIRCLES_FUNCTION_OBJECTS_ON_ROOTS_AND_POLYNOMIALS_2_H
Loading

0 comments on commit 52317dd

Please sign in to comment.