Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
misc.h
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // Copyright (c) 1999 The CGAL Consortium
4 
5 // This software and related documentation is part of the Computational
6 // Geometry Algorithms Library (CGAL).
7 // This software and documentation is provided "as-is" and without warranty
8 // of any kind. In no event shall the CGAL Consortium be liable for any
9 // damage of any kind.
10 //
11 // Every use of CGAL requires a license.
12 //
13 // Academic research and teaching license
14 // - For academic research and teaching purposes, permission to use and copy
15 // the software and its documentation is hereby granted free of charge,
16 // provided that it is not a component of a commercial product, and this
17 // notice appears in all copies of the software and related documentation.
18 //
19 // Commercial licenses
20 // - A commercial license is available through Algorithmic Solutions, who also
21 // markets LEDA (http://www.algorithmic-solutions.de).
22 // - Commercial users may apply for an evaluation license by writing to
23 // Algorithmic Solutions (contact@algorithmic-solutions.com).
24 //
25 // The CGAL Consortium consists of Utrecht University (The Netherlands),
26 // ETH Zurich (Switzerland), Free University of Berlin (Germany),
27 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
28 // (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
29 // and Tel-Aviv University (Israel).
30 //
31 // ----------------------------------------------------------------------
32 //
33 // release : CGAL-2.2
34 // release_date : 2000, September 30
35 //
36 // source : misc.fw
37 // file : include/CGAL/misc.h
38 // package : Kernel_basic (3.14)
39 // revision : 3.14
40 // revision_date : 15 Sep 2000
41 // author(s) : Andreas Fabri
42 // Stefan Schirra
43 //
44 // coordinator : MPI, Saarbruecken (<Stefan.Schirra>)
45 // email : contact@cgal.org
46 // www : http://www.cgal.org
47 //
48 // ======================================================================
49 
50 
51 #ifndef CGAL_MISC_H
52 #define CGAL_MISC_H
53 
54 #include <algorithm>
55 
57 
58 
59 /*
60 template < class T >
61 inline
62 void
63 swap(T& a, T& b)
64 {
65  T c;
66  c = a;
67  a = b;
68  b = c;
69 }
70 */
71 
72 #ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION
73 // A helper class:
74 // ---------------------
75 template <class Target, class Source>
76 struct converter
77 {
78  static inline Target do_it(const Source& s)
79  { return static_cast<Target>(s); }
80 };
81 
82 template <class Target, class Source>
83 inline
84 Target
85 convert_to (const Source& s)
87 
88 /*
89 template <class Target, class Source>
90 inline
91 Target
92 convert_to( const Source& s)
93 { return Target(s); }
94 */
95 #endif // CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION
96 
97 template <class Target, class Source>
98 inline
99 Target
100 convert_from_to( const Target& t, const Source& s)
101 { return Target(s); }
102 
104 
105 #endif // CGAL_MISC_H
double s
Definition: blastest.C:80
Definition: misc.h:76
Target convert_to(const Source &s)
Definition: misc.h:85
Target convert_from_to(const Target &t, const Source &s)
Definition: misc.h:100
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
static Target do_it(const Source &s)
Definition: misc.h:78