ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Smersh.hpp
Revision: 167
Committed: 2004-06-19T03:02:57-07:00 (21 years ago) by Douglas Thrift
File size: 943 byte(s)
Log Message:
Does stuff.

File Contents

# User Rev Content
1 Douglas Thrift 162 // Smersh
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #ifndef _Smersh_hpp_
8     #define _Smersh_hpp_
9    
10     #include <iostream>
11     #include <string>
12     #include <sstream>
13 Douglas Thrift 164 #include <vector>
14 Douglas Thrift 162 #include <map>
15 Douglas Thrift 167 #include <algorithm>
16 Douglas Thrift 166 #include <cctype>
17 Douglas Thrift 162
18     using namespace std;
19    
20 Douglas Thrift 165 #include <menes-ext/casts.hpp>
21    
22 Douglas Thrift 162 inline string sgetenv(const string& name)
23     {
24     char* value = getenv(name.c_str());
25    
26     return value != NULL ? value : "";
27     }
28    
29 Douglas Thrift 166 inline int sputenv(const string& env)
30     {
31     istringstream input(env);
32     string name, value;
33    
34     getline(input, name, '=');
35     getline(input, value);
36    
37     return setenv(name.c_str(), value.c_str(), true);
38     }
39    
40     inline void sunsetenv(const string& name) { unsetenv(name.c_str()); }
41    
42     class Person;
43    
44 Douglas Thrift 162 class Smersh
45     {
46     private:
47     multimap<string, string> cgi;
48 Douglas Thrift 166 void parse(istream& sin);
49     void smersh(ostream& sout);
50     void output(ostream& sout, const vector<Person>& people);
51 Douglas Thrift 162 public:
52 Douglas Thrift 166 Smersh(istream& sin = cin, ostream& sout = cout);
53 Douglas Thrift 162 ~Smersh() {}
54     };
55    
56     #endif // _Smersh_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id