]> www.ginac.de Git - ginac.git/blobdiff - ginac/lst.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / lst.h
index 66af406b79d7b3d5dc567f9940a978e44e8eec2f..901638e5b8c72411b8d26078c7dcaf903b002392 100644 (file)
@@ -1,6 +1,8 @@
 /** @file lst.h
  *
- *  Definition of GiNaC's lst. 
+ *  Definition of GiNaC's lst. */
+
+/*
  *  This file was generated automatically by container.pl.
  *  Please do not modify it directly, edit the perl script instead!
  *  container.pl options: $CONTAINER=lst
  *                        $prepend=1
  *                        $let_op=1
  *                        $open_bracket=[
- *                        $close_bracket=] */
+ *                        $close_bracket=]
+ *
+ *  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
+ */
 
-#ifndef _LST_H_
-#define _LST_H_
+#ifndef __GINAC_LST_H__
+#define __GINAC_LST_H__
 
 #include <list>
+#include <ginac/basic.h>
+#include <ginac/ex.h>
 
-#include <ginac/ginac.h>
+namespace GiNaC {
 
 typedef list<ex> exlist;
 
@@ -108,9 +129,13 @@ protected:
 extern const lst some_lst;
 extern type_info const & typeid_lst;
 
-// macros
+// utility functions
+inline const lst &ex_to_lst(const ex &e)
+{
+    return static_cast<const lst &>(*e.bp);
+}
 
-#define ex_to_lst(X) (static_cast<lst const &>(*(X).bp))
+} // namespace GiNaC
 
-#endif // ndef _LST_H_
+#endif // ndef __GINAC_LST_H__