ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 172
Committed: 2004-06-20T22:47:13-07:00 (21 years ago) by Douglas Thrift
File size: 1094 byte(s)
Log Message:
Moving ahead, slowly.

File Contents

# User Rev Content
1 Douglas Thrift 164 // Smersh
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #ifndef _Person_hpp_
8     #define _Person_hpp_
9    
10 Douglas Thrift 169 #include <pstream.h>
11 Douglas Thrift 164
12 Douglas Thrift 170 using namespace redi;
13    
14 Douglas Thrift 169 #include "Matcher.hpp"
15 Douglas Thrift 164
16     class Person
17     {
18     private:
19 Douglas Thrift 170 static string file;
20     static vector<string> args;
21     static string separator, begin, end;
22 Douglas Thrift 166 string name;
23     vector<Person> multiple;
24 Douglas Thrift 170 void query(const string& sn);
25 Douglas Thrift 164 public:
26     Person(const string& sn = "");
27 Douglas Thrift 166 Person(const Person& person) : name(person.name) {}
28 Douglas Thrift 164 ~Person() {}
29 Douglas Thrift 172 static void configure();
30 Douglas Thrift 166 bool isMultiple() const { return !multiple.empty(); }
31     vector<Person>::const_iterator beginMultiple() const { return
32     multiple.begin(); }
33     vector<Person>::const_iterator endMultiple() const { return multiple.end();
34     }
35     void clearMultiple() { multiple.clear(); }
36     Person& operator=(const Person& person) { name = person.name; }
37 Douglas Thrift 167 bool operator==(const Person& person) const { return name == person.name; }
38     bool operator<(const Person& person) const { return name < person.name; }
39 Douglas Thrift 166 // friends:
40     friend ostream& operator<<(ostream& sout, const Person& person) { return
41     sout << person.name; }
42 Douglas Thrift 164 };
43    
44     #endif // _Person_hpp_

Properties

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