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

# 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 269 #include "Smersh.hpp"
11    
12 Douglas Thrift 253 #include <menes-dbi/driver.hpp>
13 Douglas Thrift 179 #include <menes-dbi/connection.hpp>
14     #include <menes-dbi/resultset.hpp>
15    
16 Douglas Thrift 164 class Person
17     {
18     private:
19 Douglas Thrift 183 static string driver, host, user, password, db;
20 Douglas Thrift 166 string name;
21 douglas 349 ext::Vector<Person> multiple;
22 Douglas Thrift 170 void query(const string& sn);
23 Douglas Thrift 164 public:
24     Person(const string& sn = "");
25 Douglas Thrift 166 Person(const Person& person) : name(person.name) {}
26 Douglas Thrift 164 ~Person() {}
27 Douglas Thrift 172 static void configure();
28 douglas 349 bool isMultiple() const { return !multiple.IsEmpty(); }
29     const ext::Vector<Person>& getMultiple() const { return multiple; }
30     void clearMultiple() { multiple.Clear(); }
31 Douglas Thrift 241 Person& operator=(const Person& person) { name = person.name; return *this; }
32 Douglas Thrift 167 bool operator==(const Person& person) const { return name == person.name; }
33     bool operator<(const Person& person) const { return name < person.name; }
34 Douglas Thrift 166 // friends:
35 douglas 349 friend ostream& operator<<(ostream& sout, const Person& person) { return sout << person.name; }
36 Douglas Thrift 164 };
37    
38     #endif // _Person_hpp_

Properties

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