]> www.ginac.de Git - ginac.git/blobdiff - ginac/relational.h
- change triggered by newer automake version
[ginac.git] / ginac / relational.h
index 97a9f6668446e6ba44a72ce90caedab490f7ba1d..80d255e5f46d7c22b0ab1dff3f2f685b359440ee 100644 (file)
@@ -1,8 +1,9 @@
 /** @file relational.h
  *
- *  Interface to relations between expressions.
- *
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  Interface to relations between expressions. */
+
+/*
+ *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
 #ifndef __GINAC_RELATIONAL_H__
 #define __GINAC_RELATIONAL_H__
 
+#include <ginac/basic.h>
+#include <ginac/ex.h>
+
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 /** This class holds a relation consisting of two expressions and a logical
  *  relation between them. */
 class relational : public basic
 {
+    GINAC_DECLARE_REGISTERED_CLASS(relational, basic)
 
 // types
 public:
@@ -56,11 +65,11 @@ 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 nops() const;
+    unsigned nops() const;
     ex & let_op(int const i);
     ex eval(int level=0) const;
     ex evalf(int level=0) const;
@@ -91,8 +100,14 @@ protected:
 extern const relational some_relational;
 extern type_info const & typeid_relational;
 
-#define ex_to_relational(X) static_cast<relational const &>(*(X).bp)
-
-#endif // ndef __GINAC_RELATIONAL_H__
+// utility functions
+inline const relational &ex_to_relational(const ex &e)
+{
+       return static_cast<const relational &>(*e.bp);
+}
 
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
+#endif // ndef __GINAC_RELATIONAL_H__