]> www.ginac.de Git - ginac.git/blobdiff - ginac/isospin.h
- fixed typo.
[ginac.git] / ginac / isospin.h
index 3a8e930734e25c126838d3108fa7d486575186e6..c4d23864ea39989c31df26c5d0776aa4b35a40fe 100644 (file)
@@ -2,14 +2,31 @@
  *
  *  Interface to GiNaC's isospin objects. */
 
-#ifndef _ISOSPIN_H_
-#define _ISOSPIN_H_
+/*
+ *  GiNaC Copyright (C) 1999 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
-#include <string>
+#ifndef __GINAC_ISOSPIN_H__
+#define __GINAC_ISOSPIN_H__
 
-class isospin;
+#include <string>
+#include <ginac/indexed.h>
 
-#include "indexed.h"
+namespace GiNaC {
 
 /** Base class for isospin object */
 class isospin : public indexed
@@ -66,10 +83,12 @@ private:
 extern const isospin some_isospin;
 extern type_info const & typeid_isospin;
 
-// macros
-
-#define ex_to_isospin(X) static_cast<isospin const &>(*(X).bp)
-
-#endif // ndef _ISOSPIN_H_
+// utility functions
+inline const isospin &ex_to_isospin(const ex &e)
+{
+       return static_cast<const isospin &>(*e.bp);
+}
 
+} // namespace GiNaC
 
+#endif // ndef __GINAC_ISOSPIN_H__