]> www.ginac.de Git - ginac.git/blobdiff - ginac/lorentzidx.cpp
#ifndef around namespace GiNaC { }
[ginac.git] / ginac / lorentzidx.cpp
index e53d8a859011d8cd7d11e6b59fc5ec96414f254d..62b01aa4ff35d27c3cf6eb33253e7404bb882382 100644 (file)
@@ -2,10 +2,33 @@
  *
  *  Implementation of GiNaC's lorentz indices. */
 
+/*
+ *  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
+ */
+
 #include <stdexcept>
 
-#include "ginac.h"
+#include "lorentzidx.h"
 #include "utils.h"
+#include "debugmsg.h"
+
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -18,7 +41,7 @@ lorentzidx::lorentzidx() : orthogonal_only(false), dim_parallel_space(0)
     debugmsg("lorentzidx default constructor",LOGLEVEL_CONSTRUCT);
     // serial is incremented in idx::idx()
     name="mu"+ToString(serial);
-    tinfo_key=TINFO_LORENTZIDX;
+    tinfo_key=TINFO_lorentzidx;
 }
 
 lorentzidx::~lorentzidx() 
@@ -73,7 +96,7 @@ lorentzidx::lorentzidx(bool cov, bool oonly, unsigned dimp) :
     } else {
         name="mu"+ToString(serial);
     }
-    tinfo_key=TINFO_LORENTZIDX;
+    tinfo_key=TINFO_lorentzidx;
 }
 
 lorentzidx::lorentzidx(string const & n, bool cov, bool oonly, unsigned dimp)
@@ -81,7 +104,7 @@ lorentzidx::lorentzidx(string const & n, bool cov, bool oonly, unsigned dimp)
 {
     debugmsg("lorentzidx constructor from string,bool,bool,unsigned",
              LOGLEVEL_CONSTRUCT);
-    tinfo_key=TINFO_LORENTZIDX;
+    tinfo_key=TINFO_lorentzidx;
 }
 
 lorentzidx::lorentzidx(char const * n, bool cov, bool oonly, unsigned dimp)
@@ -89,14 +112,14 @@ lorentzidx::lorentzidx(char const * n, bool cov, bool oonly, unsigned dimp)
 {
     debugmsg("lorentzidx constructor from char*,bool,bool,unsigned",
              LOGLEVEL_CONSTRUCT);
-    tinfo_key=TINFO_LORENTZIDX;
+    tinfo_key=TINFO_lorentzidx;
 }
 
 lorentzidx::lorentzidx(unsigned const v, bool cov) : idx(v,cov),
     orthogonal_only(false), dim_parallel_space(0)
 {
     debugmsg("lorentzidx constructor from unsigned,bool",LOGLEVEL_CONSTRUCT);
-    tinfo_key=TINFO_LORENTZIDX;
+    tinfo_key=TINFO_lorentzidx;
 }
 
 //////////
@@ -207,7 +230,7 @@ bool lorentzidx::info(unsigned inf) const
 
 lorentzidx lorentzidx::create_anonymous_representative(void) const
 {
-    ASSERT(is_symbolic());
+    GINAC_ASSERT(is_symbolic());
     lorentzidx i_copy(*this);
     i_copy.serial=0;
     i_copy.name="anonymous_representative";
@@ -230,5 +253,6 @@ lorentzidx lorentzidx::create_anonymous_representative(void) const
 const lorentzidx some_lorentzidx;
 type_info const & typeid_lorentzidx=typeid(some_lorentzidx);
 
-
-
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE