]> www.ginac.de Git - ginac.git/blobdiff - ginac/utils.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / utils.h
index a19aea47a072a7b4c023322fb2af6c55a9f417f9..edde75fcde3ff071cd7e8ed4b88bcfc9a6840d99 100644 (file)
@@ -2,13 +2,33 @@
  *
  *  Interface to several small and furry utilities. */
 
-#ifndef _UTILS_H_
-#define _UTILS_H_
+/*
+ *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __GINAC_UTILS_H__
+#define __GINAC_UTILS_H__
 
 #include <strstream>
 #include <string>
 #include "config.h"
 
+namespace GiNaC {
+
 template<class T>
 string ToString(T const & t)
 {
@@ -21,9 +41,6 @@ unsigned log2(unsigned n);
 
 int compare_pointers(void const * a, void const * b);
 
-#define DYNCONSTCAST(FINALTYPE,BASICTYPE,EXPRESSION) \
-    dynamic_cast<FINALTYPE>(const_cast<BASICTYPE>(EXPRESSION))
-
 // modified from stl_algo.h: always do com(*first1,*first2) instead of comp(*first2,*first1)
 template <class InputIterator1, class InputIterator2, class OutputIterator,
           class Compare>
@@ -72,4 +89,6 @@ OutputIterator mymerge3(InputIterator1 first1, InputIterator1 last1,
   }
 }
 
-#endif // ndef _UTILS_H_
+} // namespace GiNaC
+
+#endif // ndef __GINAC_UTILS_H__