ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 173
Committed: 2004-06-21T03:15:47-07:00 (21 years ago) by Douglas Thrift
File size: 1093 byte(s)
Log Message:
Wow!

File Contents

# Content
1 // Smersh
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Person_hpp_
8 #define _Person_hpp_
9
10 #include <pstream.h>
11
12 using namespace redi;
13
14 #include "Matcher.hpp"
15
16 class Person
17 {
18 private:
19 static string file;
20 static vector<string> args;
21 static string separator, begin, end;
22 string name;
23 vector<Person> multiple;
24 void query(const string& sn);
25 public:
26 Person(const string& sn = "");
27 Person(const Person& person) : name(person.name) {}
28 ~Person() {}
29 static void configure();
30 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 bool operator==(const Person& person) const { return name == person.name; }
38 bool operator<(const Person& person) const { return name < person.name; }
39 // friends:
40 friend ostream& operator<<(ostream& sout, const Person& person) { return
41 sout << person.name; }
42 };
43
44 #endif // _Person_hpp_

Properties

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