]> www.ginac.de Git - ginac.git/blobdiff - ginac/lorentzidx.h
- Introduced exception do_taylor to signal Taylor expansion is ok for series
[ginac.git] / ginac / lorentzidx.h
index 001494088735c39fc96002ab234e442bc9cc48af..260296efe7883c5cc19de06249239bbf6b88ce06 100644 (file)
@@ -1,7 +1,8 @@
 /** @file lorentzidx.h
  *
- *  Interface to GiNaC's lorentz indices.
- *
+ *  Interface to 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
 #include <vector>
 #include <ginac/idx.h>
 
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 class lorentzidx : public idx
 {
     friend class simp_lor;
@@ -80,8 +85,14 @@ protected:
 extern const lorentzidx some_lorentzidx;
 extern type_info const & typeid_lorentzidx;
 
-// macros
+// utility functions
+inline const lorentzidx &ex_to_lorentzidx(const ex &e)
+{
+       return static_cast<const lorentzidx &>(*e.bp);
+}
 
-#define ex_to_lorentzidx(X) (static_cast<lorentzidx const &>(*(X).bp))
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_LORENTZIDX_H__