]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / indexed.h
index 97e3e1a71229f4f056f8919b81c0d0227690ff57..3707e6290184d56d613b135a3ab0c7536a3df1ca 100644 (file)
@@ -1,7 +1,8 @@
 /** @file indexed.h
  *
 /** @file indexed.h
  *
- *  Interface to GiNaC's index carrying objects.
- *
+ *  Interface to GiNaC's index carrying objects. */
+
+/*
  *  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
@@ -25,6 +26,8 @@
 #include <string>
 #include <ginac/exprseq.h>
 
 #include <string>
 #include <ginac/exprseq.h>
 
+namespace GiNaC {
+
 /** Base class for non-commutative indexed objects */
 class indexed : public exprseq
 {
 /** Base class for non-commutative indexed objects */
 class indexed : public exprseq
 {
@@ -85,10 +88,12 @@ protected:
 extern const indexed some_indexed;
 extern type_info const & typeid_indexed;
 
 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)
+} // namespace GiNaC
 
 #endif // ndef __GINAC_INDEXED_H__
 
 #endif // ndef __GINAC_INDEXED_H__
-
-