ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 241
Committed: 2004-09-11T20:59:56-07:00 (20 years, 9 months ago) by Douglas Thrift
File size: 1094 byte(s)
Log Message:
Meep!

File Contents

# Content
1 // Smersh
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Person_hpp_
8 #define _Person_hpp_
9
10 #include <menes-dbi/connection.hpp>
11 #include <menes-dbi/resultset.hpp>
12
13 #include "Smersh.hpp"
14
15 class Person
16 {
17 private:
18 static string driver, host, user, password, db;
19 string name;
20 vector<Person> multiple;
21 void query(const string& sn);
22 public:
23 Person(const string& sn = "");
24 Person(const Person& person) : name(person.name) {}
25 ~Person() {}
26 static void configure();
27 bool isMultiple() const { return !multiple.empty(); }
28 vector<Person>::const_iterator beginMultiple() const { return
29 multiple.begin(); }
30 vector<Person>::const_iterator endMultiple() const { return multiple.end();
31 }
32 void clearMultiple() { multiple.clear(); }
33 Person& operator=(const Person& person) { name = person.name; return *this; }
34 bool operator==(const Person& person) const { return name == person.name; }
35 bool operator<(const Person& person) const { return name < person.name; }
36 // friends:
37 friend ostream& operator<<(ostream& sout, const Person& person) { return
38 sout << person.name; }
39 };
40
41 #endif // _Person_hpp_

Properties

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