]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.h
- Changed policy: look for cln/cln.h instead of CLN/cln.h, reflecting an
[ginac.git] / ginac / indexed.h
index 7f13af51bef0439451a090652f67f9d811f996bc..ce416ff955652b05e5eeb1e581772a41f4d3ac81 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's index carrying objects. */
 
 /*
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  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
 #include <string>
 #include <ginac/exprseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
 /** Base class for non-commutative indexed objects */
 class indexed : public exprseq
 {
+    GINAC_DECLARE_REGISTERED_CLASS(indexed, exprseq)
+
 // member functions
 
     // default constructor, destructor, copy constructor assignment operator and helpers
@@ -46,6 +52,7 @@ public:
     indexed(ex const & i1);
     indexed(ex const & i1, ex const & i2);
     indexed(ex const & i1, ex const & i2, ex const & i3);
+    indexed(ex const & i1, ex const & i2, ex const & i3, ex const & i4);
     indexed(exvector const & iv);
     indexed(exvector * iv);
 
@@ -86,10 +93,14 @@ protected:
 extern const indexed some_indexed;
 extern type_info const & typeid_indexed;
 
-// macros
+// utility functions
+inline const indexed &ex_to_indexed(const ex &e)
+{
+       return static_cast<const indexed &>(*e.bp);
+}
 
-#define ex_to_indexed(X) static_cast<indexed const &>(*(X).bp)
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_INDEXED_H__
-
-