ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 349
Committed: 2004-12-16T18:15:34-08:00 (20 years, 6 months ago) by douglas
File size: 1032 byte(s)
Log Message:
Horribly broken, including parts of menes.

File Contents

# Content
1 // Smersh
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Person_hpp_
8 #define _Person_hpp_
9
10 #include "Smersh.hpp"
11
12 #include <menes-dbi/driver.hpp>
13 #include <menes-dbi/connection.hpp>
14 #include <menes-dbi/resultset.hpp>
15
16 class Person
17 {
18 private:
19 static string driver, host, user, password, db;
20 string name;
21 ext::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.IsEmpty(); }
29 const ext::Vector<Person>& getMultiple() const { return multiple; }
30 void clearMultiple() { multiple.Clear(); }
31 Person& operator=(const Person& person) { name = person.name; return *this; }
32 bool operator==(const Person& person) const { return name == person.name; }
33 bool operator<(const Person& person) const { return name < person.name; }
34 // friends:
35 friend ostream& operator<<(ostream& sout, const Person& person) { return sout << person.name; }
36 };
37
38 #endif // _Person_hpp_

Properties

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