X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fwildcard.cpp;h=8bf8c6a739c1b7e5c6307f21805c5f33cd879159;hp=a0d593493558a2e17bc99d209269a64d96778eda;hb=db52ae4c832e9a9981ecf78ecc3c9e59f461d8e4;hpb=488cad4c124885230154720041bd51fa4d983a8b diff --git a/ginac/wildcard.cpp b/ginac/wildcard.cpp index a0d59349..8bf8c6a7 100644 --- a/ginac/wildcard.cpp +++ b/ginac/wildcard.cpp @@ -3,7 +3,7 @@ * Implementation of GiNaC's wildcard objects. */ /* - * GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2005 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 @@ -17,13 +17,12 @@ * * 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 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "wildcard.h" -#include "print.h" #include "archive.h" #include "utils.h" @@ -92,7 +91,7 @@ void wildcard::do_print(const print_context & c, unsigned level) const void wildcard::do_print_tree(const print_tree & c, unsigned level) const { - c.s << std::string(level, ' ') << class_name() << " (" << label << ")" + c.s << std::string(level, ' ') << class_name() << "(" << label << ")" << " @" << this << std::hex << ", hash=0x" << hashvalue << ", flags=0x" << flags << std::dec << std::endl; } @@ -120,4 +119,14 @@ bool wildcard::match(const ex & pattern, lst & repl_lst) const return is_equal(ex_to(pattern)); } +bool haswild(const ex & x) +{ + if (is_a(x)) + return true; + for (size_t i=0; i