* Implementation of GiNaC's wildcard objects. */
/*
- * GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2004 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
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;
}
return is_equal(ex_to<basic>(pattern));
}
+bool haswild(const ex & x)
+{
+ if (is_a<wildcard>(x))
+ return true;
+ for (int i=0; i<x.nops(); ++i)
+ if (haswild(x.op(i)))
+ return true;
+ return false;
+}
+
} // namespace GiNaC