util - / / util / A utility class to provide various...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// // util - // A utility class to provide various services not conveniently // included in other modules. // / #ifndef __UTIL_H__ #define __UTIL_H__ # #include <iostream> #include <vector> # #ifdef __GNUC__ #include <stdexcept> #endif # using namespace std; u #include "trace.h" # // // A couple of convenient typedefs to allow brevity of code elsewhere. // / typedef vector<string> wordvec; typedef wordvec::iterator wordvec_itor; t // // yshell_exn - // Extend runtime_error for throwing exceptions related to this // program. // / class yshell_exn: public runtime_error { public: explicit yshell_exn (const string &what); }; } // // execname - // Returns the basename of the executable image, which is used in // printing error messags. // / string execname(); s // // want_echo - // We want to echo all of cin to cout if if either cin or cout // is not a tty. This helps make batch processing easier by // making cout look like a terminal session trace. // / bool want_echo();
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/26/2010 for the course CMPS 109 taught by Professor Bailey,d during the Spring '08 term at UCSC.

Page1 / 3

util - / / util / A utility class to provide various...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online