// Smersh // // Douglas Thrift // // $Id$ #ifndef _Smersh_hpp_ #define _Smersh_hpp_ #include #include #include #include #include #include #include using namespace std; #include inline string sgetenv(const string& name) { char* value = getenv(name.c_str()); return value != NULL ? value : ""; } inline int sputenv(const string& env) { istringstream input(env); string name, value; getline(input, name, '='); getline(input, value); return setenv(name.c_str(), value.c_str(), true); } inline void sunsetenv(const string& name) { unsetenv(name.c_str()); } class Person; class Smersh { private: multimap cgi; void parse(istream& sin); void smersh(ostream& sout); void output(ostream& sout, const vector& people); public: Smersh(istream& sin = cin, ostream& sout = cout); ~Smersh() {} }; #endif // _Smersh_hpp_