X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fwildcard.cpp;h=eef0376c0a9caab5ee4e604d6e6b0b7b3afeaef7;hb=da64e515abf7243bc4c84ca3631470931c4e6691;hp=a538838b18beb30704660aaf3eaec87ab2ac08da;hpb=b4be7b0f30fbb6178cf4ee83e1b3952e084bd8ca;p=ginac.git diff --git a/ginac/wildcard.cpp b/ginac/wildcard.cpp index a538838b..eef0376c 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,7 +17,7 @@ * * 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 @@ -91,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; } @@ -119,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 (int i=0; i