]> www.ginac.de Git - ginac.git/blobdiff - ginac/lorentzidx.cpp
removed the "some_*" and "typeid_*" definitions since we are using our own
[ginac.git] / ginac / lorentzidx.cpp
index 500fcb85f271bfb7d53c30a6b139818590403b34..67e5576b8730979d6cf42874f6965488f771c987 100644 (file)
@@ -1,6 +1,6 @@
 /** @file lorentzidx.cpp
  *
- *  Implementation of GiNaC's lorentz indices. */
+ *  Implementation of GiNaC's Lorentz indices. */
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
@@ -24,6 +24,7 @@
 
 #include "lorentzidx.h"
 #include "lst.h"
+#include "symbol.h"
 #include "archive.h"
 #include "utils.h"
 #include "debugmsg.h"
@@ -99,7 +100,7 @@ void lorentzidx::destroy(bool call_parent)
 lorentzidx::lorentzidx(bool cov, bool oonly, unsigned dimp)
   : idx(cov), orthogonal_only(oonly), dim_parallel_space(dimp)
 {
-       debugmsg("lorentzidx constructor from bool",LOGLEVEL_CONSTRUCT);
+       debugmsg("lorentzidx constructor from bool,bool,unsigned",LOGLEVEL_CONSTRUCT);
        // serial is incremented in idx::idx(bool)
        if (oonly) {
                name="muorth"+ToString(serial);
@@ -281,12 +282,6 @@ bool lorentzidx::info(unsigned inf) const
        return inherited::info(inf);
 }
 
-//////////
-// new virtual functions which can be overridden by derived classes
-//////////
-
-// none
-
 //////////
 // non-virtual functions in this class
 //////////
@@ -307,17 +302,15 @@ lorentzidx lorentzidx::create_anonymous_representative(void) const
 }
 
 //////////
-// static member variables
-//////////
-
-// none
-
-//////////
-// global constants
+// global functions
 //////////
 
-const lorentzidx some_lorentzidx;
-const std::type_info & typeid_lorentzidx = typeid(some_lorentzidx);
+/** Return the global symbol that represents the dimension D of spacetime. */
+ex Dim(void)
+{
+       static symbol *d = new symbol("dim");
+       return *d;
+}
 
 #ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC