]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.h
- Banned exZERO(), exONE(), exMINUSHALF() and all this from the interface.
[ginac.git] / ginac / add.h
index 0545bcd2e1fd9d3710ce01e01054ee1bdadafff7..1943805621a0e0b691896a687fdbd77a7cb3fae6 100644 (file)
 
 #include <ginac/expairseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 /** Sum of expressions. */
 class add : public expairseq
 {
@@ -56,8 +60,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=0) const;
+    void printraw(ostream & os) const;
     void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
     bool info(unsigned inf) const;
     int degree(symbol const & s) const;
@@ -79,8 +83,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;
@@ -106,6 +108,14 @@ protected:
 extern const add some_add;
 extern type_info const & typeid_add;
 
-#define ex_to_add(X) static_cast<add const &>(*(X).bp)
+// utility functions
+inline const add &ex_to_add(const ex &e)
+{
+       return static_cast<const add &>(*e.bp);
+}
+
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_ADD_H__