3 * Definition of GiNaC's lst.
4 * This file was generated automatically by container.pl.
5 * Please do not modify it directly, edit the perl script instead!
6 * container.pl options: $CONTAINER=lst
14 * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #ifndef __GINAC_LST_H__
32 #define __GINAC_LST_H__
35 #include <ginac/basic.h>
37 typedef list<ex> exlist;
39 class lst : public basic
45 lst(lst const & other);
46 lst const & operator=(lst const & other);
48 void copy(lst const & other);
49 void destroy(bool call_parent);
52 lst(exlist const & s, bool discardable=0);
53 lst(exlist * vp); // vp will be deleted
54 explicit lst(ex const & e1);
55 explicit lst(ex const & e1, ex const & e2);
56 explicit lst(ex const & e1, ex const & e2, ex const & e3);
57 explicit lst(ex const & e1, ex const & e2, ex const & e3,
59 explicit lst(ex const & e1, ex const & e2, ex const & e3,
60 ex const & e4, ex const & e5);
61 explicit lst(ex const & e1, ex const & e2, ex const & e3,
62 ex const & e4, ex const & e5, ex const & e6);
63 explicit lst(ex const & e1, ex const & e2, ex const & e3,
64 ex const & e4, ex const & e5, ex const & e6,
66 explicit lst(ex const & e1, ex const & e2, ex const & e3,
67 ex const & e4, ex const & e5, ex const & e6,
68 ex const & e7, ex const & e8);
69 explicit lst(ex const & e1, ex const & e2, ex const & e3,
70 ex const & e4, ex const & e5, ex const & e6,
71 ex const & e7, ex const & e8, ex const & e9);
72 explicit lst(ex const & e1, ex const & e2, ex const & e3,
73 ex const & e4, ex const & e5, ex const & e6,
74 ex const & e7, ex const & e8, ex const & e9,
78 basic * duplicate() const;
79 void printraw(ostream & os) const;
80 void print(ostream & os, unsigned upper_precedence=0) const;
81 void printtree(ostream & os, unsigned indent) const;
82 bool info(unsigned inf) const;
84 ex & let_op(int const i);
85 ex expand(unsigned options=0) const;
86 bool has(ex const & other) const;
87 ex eval(int level=0) const;
88 ex evalf(int level=0) const;
89 ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
90 ex diff(symbol const & s) const;
91 ex subs(lst const & ls, lst const & lr) const;
93 int compare_same_type(basic const & other) const;
94 bool is_equal_same_type(basic const & other) const;
95 unsigned return_type(void) const;
97 // new virtual functions which can be overridden by derived classes
99 virtual lst & append(ex const & b);
100 virtual lst & prepend(ex const & b);
103 virtual void printseq(ostream & os, char openbracket, char delim,
104 char closebracket, unsigned this_precedence,
105 unsigned upper_precedence=0) const;
106 virtual ex thislst(exlist const & v) const;
107 virtual ex thislst(exlist * vp) const;
110 bool is_canonical() const;
111 exlist evalchildren(int level) const;
112 exlist evalfchildren(int level) const;
113 exlist normalchildren(int level) const;
114 exlist diffchildren(symbol const & s) const;
115 exlist * subschildren(lst const & ls, lst const & lr) const;
119 static unsigned precedence;
124 extern const lst some_lst;
125 extern type_info const & typeid_lst;
129 #define ex_to_lst(X) (static_cast<lst const &>(*(X).bp))
131 #endif // ndef __GINAC_LST_H__