]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.pl
- changed old-style power() to new-style pow()
[ginac.git] / ginac / structure.pl
index b6137d0b41f57c2ddec32b254b9d07d621215377..fdd7ddf98dfda9e62932296f53891af4e5d75436 100755 (executable)
@@ -125,7 +125,7 @@ $interface=<<END_OF_INTERFACE;
  *  This file was generated automatically by structure.pl.
  *  Please do not modify it directly, edit the perl script instead!
  *
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 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
@@ -150,7 +150,9 @@ ${input_structure}
 
 #include <ginac/structure.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class ${STRUCTURE} : public structure
 {
@@ -215,7 +217,9 @@ extern const unsigned tinfo_${STRUCTURE};
 
 #define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp))
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef _${STRUCTURE_UC}_H_
 
@@ -230,7 +234,7 @@ $implementation=<<END_OF_IMPLEMENTATION;
  *  This file was generated automatically by STRUCTURE.pl.
  *  Please do not modify it directly, edit the perl script instead!
  *
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 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
@@ -254,7 +258,9 @@ ${input_structure}
 
 #include "${STRUCTURE}.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -354,8 +360,8 @@ int ${STRUCTURE}::nops() const
 
 ex & ${STRUCTURE}::let_op(int const i)
 {
-    ASSERT(i>=0);
-    ASSERT(i<nops());
+    GINAC_ASSERT(i>=0);
+    GINAC_ASSERT(i<nops());
 
     switch (i) {
 ${let_op_statements}
@@ -378,7 +384,7 @@ ${expand_statements}
 
 bool ${STRUCTURE}::has(ex const & other) const
 {
-    ASSERT(other.bp!=0);
+    GINAC_ASSERT(other.bp!=0);
     if (is_equal(*other.bp)) return true;
 ${has_statements}
     return false;
@@ -450,7 +456,7 @@ ${subs_statements}
 
 int ${STRUCTURE}::compare_same_type(basic const & other) const
 {
-    ASSERT(is_of_type(other,${STRUCTURE}));
+    GINAC_ASSERT(is_of_type(other,${STRUCTURE}));
     ${STRUCTURE} const & o=static_cast<${STRUCTURE} const &>
                                     (const_cast<basic &>(other));
     int cmpval;
@@ -460,7 +466,7 @@ ${compare_statements}
 
 bool ${STRUCTURE}::is_equal_same_type(basic const & other) const
 {
-    ASSERT(is_of_type(other,${STRUCTURE}));
+    GINAC_ASSERT(is_of_type(other,${STRUCTURE}));
     ${STRUCTURE} const & o=static_cast<${STRUCTURE} const &>
                                     (const_cast<basic &>(other));
 ${is_equal_statements}
@@ -508,7 +514,9 @@ const ${STRUCTURE} some_${STRUCTURE};
 type_info const & typeid_${STRUCTURE}=typeid(some_${STRUCTURE});
 const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}");
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 END_OF_IMPLEMENTATION