]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.pl
- rotate_31() and golden_hash_ratio() moved to utils.h
[ginac.git] / ginac / structure.pl
index 725b03a592519e0c6d7b7b038e15414f25c4c29c..b6137d0b41f57c2ddec32b254b9d07d621215377 100755 (executable)
@@ -119,18 +119,38 @@ $types_ok_statements=generate(
 $interface=<<END_OF_INTERFACE;
 /** \@file ${STRUCTURE}.h
  *
- *  Definition of GiNaC's user defined structure ${STRUCTURE}. 
+ *  Definition of GiNaC's user defined structure ${STRUCTURE}. */
+
+/*
  *  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
+ *
+ *  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
  */
 
 // structure.pl input:
 ${input_structure}
 
-#ifndef _${STRUCTURE_UC}_H_
-#define _${STRUCTURE_UC}_H_
+#ifndef __GINAC_${STRUCTURE_UC}_H__
+#define __GINAC_${STRUCTURE_UC}_H__
+
+#include <ginac/structure.h>
 
-#include <ginac/ginac.h>
+namespace GiNaC {
 
 class ${STRUCTURE} : public structure
 {
@@ -195,6 +215,8 @@ extern const unsigned tinfo_${STRUCTURE};
 
 #define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp))
 
+} // namespace GiNaC
+
 #endif // ndef _${STRUCTURE_UC}_H_
 
 END_OF_INTERFACE
@@ -202,9 +224,27 @@ END_OF_INTERFACE
 $implementation=<<END_OF_IMPLEMENTATION;
 /** \@file ${STRUCTURE}.cpp
  *
- *  Implementation of GiNaC's user defined structure ${STRUCTURE}. 
+ *  Implementation of GiNaC's user defined structure ${STRUCTURE}. */
+
+/*
  *  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
+ *
+ *  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
  */
 
 // structure.pl input:
@@ -212,7 +252,9 @@ ${input_structure}
 
 #include <iostream>
 
-#include "ginac.h"
+#include "${STRUCTURE}.h"
+
+namespace GiNaC {
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -466,6 +508,8 @@ const ${STRUCTURE} some_${STRUCTURE};
 type_info const & typeid_${STRUCTURE}=typeid(some_${STRUCTURE});
 const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}");
 
+} // namespace GiNaC
+
 END_OF_IMPLEMENTATION
 
 print "Creating interface file ${STRUCTURE}.h...";