X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fbasic.cpp;h=7b6a6fbeb5b2ffda4ebeb267d32d8ddf6bcef82b;hp=96fa259d0409b5db4de12c196e735a2df5846fab;hb=955cb185a85535ab328ffedbfccdc508ce80fa91;hpb=afdd7fa8c6c0a587f7c80789198551383e8beb7b diff --git a/ginac/basic.cpp b/ginac/basic.cpp index 96fa259d..7b6a6fbe 100644 --- a/ginac/basic.cpp +++ b/ginac/basic.cpp @@ -110,6 +110,59 @@ basic::basic(unsigned ti) : flags(0), refcount(0), tinfo_key(ti) // public +/** Output to stream formatted to be useful as ginsh input. */ +void basic::print(ostream & os, unsigned upper_precedence) const +{ + debugmsg("basic print",LOGLEVEL_PRINT); + os << "[basic object]"; +} + +/** Output to stream in ugly raw format, so brave developers can have a look + * at the underlying structure. */ +void basic::printraw(ostream & os) const +{ + debugmsg("basic printraw",LOGLEVEL_PRINT); + os << "[basic object]"; +} + +/** Output to stream formatted in tree- (indented-) form, so developers can + * have a look at the underlying structure. */ +void basic::printtree(ostream & os, unsigned indent) const +{ + debugmsg("basic printtree",LOGLEVEL_PRINT); + os << string(indent,' ') << "type=" << typeid(*this).name() + << ", hash=" << hashvalue << " (0x" << hex << hashvalue << dec << ")" + << ", flags=" << flags + << ", nops=" << nops() << endl; + for (int i=0; i