]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.h
- Introduced exception do_taylor to signal Taylor expansion is ok for series
[ginac.git] / ginac / add.h
index 1b9651977030d2f719d4ae17ff89fdaf1caa7341..1acb03d17200b5cdeb1c8323957e3dd41312247f 100644 (file)
@@ -1,7 +1,8 @@
 /** @file add.h
  *
- *  Interface to GiNaC's sums of expressions.
- *
+ *  Interface to GiNaC's sums of expressions. */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
 
 #include <ginac/expairseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 /** Sum of expressions. */
 class add : public expairseq
 {
@@ -78,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;
@@ -105,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__