ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.cpp
(Generate patch)

Comparing Smersh/Person.cpp (file contents):
Revision 167 by Douglas Thrift, 2004-06-19T03:02:57-07:00 vs.
Revision 169 by Douglas Thrift, 2004-06-19T17:38:00-07:00

# Line 5 | Line 5
5   // $Id$
6  
7   #include "Person.hpp"
8 #include "Matcher.hpp" // XXX use SQL
8  
9   Person::Person(const string& sn) : name("Unknown Person")
10   {
11 <        // SELECT name FROM people, peopleaimmap, aim
13 <        //     WHERE people.id=pid
14 <        //     AND aid=aim.id
15 <        //     AND sn=LOWER($1)
16 <        
17 <        string sn_(sn); // XXX get rid of
18 <
19 <        for (string::size_type index(0); index < sn_.length(); ++index)
20 <        {
21 <                if (isupper(sn_[index])) sn_[index] = tolower(sn_[index]);
22 <        } // XXX won't need
23 <
24 <        Matcher matcher; // XXX definitely won't need
25 <
26 <        if (sn_ == matcher("^douglaswth|dwtoliver|dwtstanley$"))
27 <        {
28 <                name = "Douglas William Thrift";
29 <
30 <                Person person;
31 <
32 <                if (sn_ == "dwtoliver")
33 <                {
34 <                        person.name = "Oliver Hardy";
35 <
36 <                        multiple.push_back(person);
37 <                }
38 <                else if (sn_ == "dwtstanley")
39 <                {
40 <                        person.name = "Stanley Laurel";
41 <
42 <                        multiple.push_back(person);
43 <                }
44 <        }
45 <        else if (sn_ == "aemoncannon")
46 <        {
47 <                name = "Aemon Cannon";
48 <        }
49 <        else if (sn_ == "alpineguycom")
50 <        {
51 <                name = "Colin Curtin";
52 <        }
53 <        else if (sn_ == "iamfayemous")
54 <        {
55 <                name = "Courtney Faye Minteer";
56 <        }
57 <        else if (sn_ == "shupappa")
58 <        {
59 <                name = "David Salamon";
60 <        }
61 <        else if (sn_ == "csreddaddy")
62 <        {
63 <                name = "Hamid Tahsildoost";
64 <        }
65 <        else if (sn_ == "hamlett17")
66 <        {
67 <                name = "Jackson Strobel";
68 <        }
69 <        else if (sn_ == "saurik")
70 <        {
71 <                name = "Jay Freeman";
72 <        }
73 <        else if (sn_ == "crxscentfresh")
74 <        {
75 <                name = "Jessica Landon";
76 <        }
77 <        else if (sn_ == "sagath84")
78 <        {
79 <                name = "Kian Wilcox";
80 <        }
81 <        else if (sn_ == "tobasc0cat")
82 <        {
83 <                name = "Mika McKinnon";
84 <        }
85 <        else if (sn_ == "slurp007")
86 <        {
87 <                name = "Rohit Gehani";
88 <        }
89 <        else if (sn_ == "fishofgoat")
90 <        {
91 <                name = "Seth King";
92 <        }
93 <        else if (sn_ == "amarmoset")
11 >        if (!sn.empty())
12          {
13 <                name = "Shawn Brenneman";
13 > //              EXEC SQL SELECT name INTO :name_ :name_ind
14 > //                      FROM people, peopleaimmap, aim
15 > //                      WHERE people.id=pid AND aid = aim.id AND sn = LOWER(:sn_);
16          }
17   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines