]> www.ginac.de Git - ginac.git/blobdiff - ginac/simp_lor.h
#ifndef around namespace GiNaC { }
[ginac.git] / ginac / simp_lor.h
index a3971bf411ee8728a60b0c459ee24b894e67341a..44543fc8234ce426244e0032d2c5740a30b6bb00 100644 (file)
 #include <ginac/indexed.h>
 #include <ginac/lorentzidx.h>
 
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 typedef pair<string,string> strstrpair;
 typedef pair<strstrpair,lorentzidx> spmapkey;
 
@@ -151,10 +155,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);
@@ -162,6 +172,8 @@ 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__
-
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
+#endif // ndef _SIMP__GINAC_LOR_H__