#include "molecules.hpp" /** Prints the tabs according to verbosity stored in the temporary constructed class. * \param &ost stream to extend with tabs * \return &ost stream with tabs */ ostream& Verbose::print (ostream &ost) const { for (int i=Verbosity;i--;) ost.put('\t'); //cout << "Verbose(.) called." << endl; return ost; }; /** Operator for the Verbose(arg) call. * Constructs temporary a Verbose class object, wherein the verbosity is stored. * Then << is called, which calls Verbose's print which adds the tabs and returns the stream. * \param &ost stream to extend * \param &m pointer to created Verbose object * \return &ost */ ostream& operator<<(ostream& ost,const Verbose& m) { return m.print(ost); }; /** Prints the tabs according to verbosity stored in the temporary constructed class. * Note that highest bit is set artificially to give number of bits to print * \param &ost stream to extend with tabs * \return &ost stream with tabs */ ostream& Binary::print (ostream &ost) const { int bits = 1, counter = 1; while ((bits = 1 << counter) < BinaryNumber) counter++; for (int i=0;i