]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / add.h
index 783830345b682f4d18ee7bcd6741fc6a77e4104e..f471741b95464d5539283ae7158a498d31c8a76a 100644 (file)
@@ -1,7 +1,8 @@
 /** @file add.h
  *
 /** @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
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
 #ifndef __GINAC_ADD_H__
 #define __GINAC_ADD_H__
 
 #ifndef __GINAC_ADD_H__
 #define __GINAC_ADD_H__
 
+#include <ginac/expairseq.h>
+
+namespace GiNaC {
+
 /** Sum of expressions. */
 class add : public expairseq
 {
 /** Sum of expressions. */
 class add : public expairseq
 {
@@ -103,7 +108,12 @@ protected:
 extern const add some_add;
 extern type_info const & typeid_add;
 
 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);
+}
 
 
-#endif // ndef __GINAC_ADD_H__
+} // namespace GiNaC
 
 
+#endif // ndef __GINAC_ADD_H__