]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / mul.h
index b134fc207c1317b76a51a6b77f14356b990a26e8..4e5a6e63846c10703c06d6d5742671fdc55bef8a 100644 (file)
@@ -1,7 +1,8 @@
 /** @file mul.h
  *
- *  Interface to GiNaC's products of expressions.
- *
+ *  Interface to GiNaC's products of expressions. */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -24,6 +25,8 @@
 
 #include <ginac/expairseq.h>
 
+namespace GiNaC {
+
 /** Product of expressions. */
 class mul : public expairseq
 {
@@ -112,6 +115,12 @@ protected:
 extern const mul some_mul;
 extern type_info const & typeid_mul;
 
-#define ex_to_mul(X) static_cast<mul const &>(*(X).bp)
+// utility functions
+inline const mul &ex_to_mul(const ex &e)
+{
+       return static_cast<const mul &>(*e.bp);
+}
+
+} // namespace GiNaC
 
 #endif // ndef __GINAC_MUL_H__