]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.h
- introduced info_flags::cinteger, info_flags::crational,
[ginac.git] / ginac / mul.h
index 46b3791e40c3243e72726002ceba69b1833b59b4..71b686bbb9b829fdaccf9da06a4cae0737014cd0 100644 (file)
 
 #include <ginac/expairseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 /** Product of expressions. */
 class mul : public expairseq
 {
@@ -57,8 +61,8 @@ public:
     // functions overriding virtual functions from bases classes
 public:
     basic * duplicate() const;
-    void printraw(ostream & os) const;
     void print(ostream & os, unsigned upper_precedence) const;
+    void printraw(ostream & os) const;
     void printcsrc(ostream & os, unsigned type, unsigned upper_precedence) const;
     bool info(unsigned inf) const;
     int degree(symbol const & s) const;
@@ -80,8 +84,6 @@ protected:
     unsigned return_type_tinfo(void) const;
     ex thisexpairseq(epvector const & v, ex const & oc) const;
     ex thisexpairseq(epvector * vp, ex const & oc) const;
-    void printpair(ostream & os, expair const & p,
-                   unsigned upper_precedence) const;
     expair split_ex_to_pair(ex const & e) const;
     expair combine_ex_with_coeff_to_pair(ex const & e,
                                          ex const & c) const;
@@ -113,6 +115,14 @@ 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);
+}
+
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_MUL_H__