// Algorithm.h // Superclass for all algorithm classes. // We inherit from TrfObject but implement type methods so that // subclasses have the option of ignoring these. This is for // backward compatibility. #ifndef Algorithm_H #define Algorithm_H #include #include "trfobj/TrfReportingObject.h" namespace trf { class Algorithm; // Output stream. std::ostream& operator<<(std::ostream& lhs, const Algorithm& rhs); class Algorithm : public TrfReportingObject { private: // debug flag: access with set or get method int _debug; private: // output stream virtual void ostr(std::ostream& stream) const = 0; public: // constructor Algorithm( ); // destructor virtual ~Algorithm( ); // Non-zero values produce debug messages to cerr. void set_debug(int debug); // Fetch the debug flag. int get_debug( ) const; // Output stream. friend std::ostream& operator<<(std::ostream& lhs, const Algorithm& rhs); }; } // end namespace trf #endif