ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 183
Committed: 2004-07-04T21:27:49-07:00 (21 years ago) by Douglas Thrift
File size: 1080 byte(s)
Log Message:
Now menes-dbi supports MySQL, ack!

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 179 #include <menes-dbi/connection.hpp>
11     #include <menes-dbi/resultset.hpp>
12    
13     #include "Smersh.hpp"
14 Douglas Thrift 164
15     class Person
16     {
17     private:
18 Douglas Thrift 183 static string driver, host, user, password, db;
19 Douglas Thrift 166 string name;
20     vector<Person> multiple;
21 Douglas Thrift 170 void query(const string& sn);
22 Douglas Thrift 164 public:
23     Person(const string& sn = "");
24 Douglas Thrift 166 Person(const Person& person) : name(person.name) {}
25 Douglas Thrift 164 ~Person() {}
26 Douglas Thrift 172 static void configure();
27 Douglas Thrift 166 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 Douglas Thrift 173 }
32 Douglas Thrift 166 void clearMultiple() { multiple.clear(); }
33     Person& operator=(const Person& person) { name = person.name; }
34 Douglas Thrift 167 bool operator==(const Person& person) const { return name == person.name; }
35     bool operator<(const Person& person) const { return name < person.name; }
36 Douglas Thrift 166 // friends:
37     friend ostream& operator<<(ostream& sout, const Person& person) { return
38     sout << person.name; }
39 Douglas Thrift 164 };
40    
41     #endif // _Person_hpp_

Properties

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