ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 253
Committed: 2004-09-13T23:31:24-07:00 (20 years, 9 months ago) by Douglas Thrift
File size: 1126 byte(s)
Log Message:
This is a bit futzy!?

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

Properties

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