]> www.ginac.de Git - ginac.git/blobdiff - ginac/simp_lor.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / simp_lor.h
index eefddac792d54cd20d6fb5a5e840305a1b756100..643a6d91f5d49ce51fb70fc7c87d77823ebd34c8 100644 (file)
@@ -1,7 +1,8 @@
 /** @file simp_lor.h
  *
- *  Interface to GiNaC's simp_lor objects.
- *
+ *  Interface to GiNaC's simp_lor objects. */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -30,6 +31,8 @@
 #include <ginac/indexed.h>
 #include <ginac/lorentzidx.h>
 
+namespace GiNaC {
+
 typedef pair<string,string> strstrpair;
 typedef pair<strstrpair,lorentzidx> spmapkey;
 
@@ -150,10 +153,16 @@ protected:
 extern const simp_lor some_simp_lor;
 extern type_info const & typeid_simp_lor;
 
-// macros
+// utility functions
+inline const simp_lor &ex_to_simp_lor(const ex &e)
+{
+       return static_cast<const simp_lor &>(*e.bp);
+}
 
-#define ex_to_simp_lor(X) static_cast<simp_lor const &>(*(X).bp)
-#define ex_to_nonconst_simp_lor(X) static_cast<simp_lor &>(*(X).bp)
+inline simp_lor &ex_to_nonconst_simp_lor(const ex &e)
+{
+       return static_cast<simp_lor &>(*e.bp);
+}
 
 simp_lor lor_g(ex const & mu, ex const & nu);
 simp_lor lor_vec(string const & n, ex const & mu);
@@ -161,6 +170,6 @@ ex simplify_simp_lor_mul(ex const & m, scalar_products const & sp);
 ex simplify_simp_lor(ex const & e, scalar_products const & sp);
 ex Dim(void);
 
-#endif // ndef _SIMP__GINAC_LOR_H__
-
+} // namespace GiNaC
 
+#endif // ndef _SIMP__GINAC_LOR_H__