ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Person.hpp
Revision: 169
Committed: 2004-06-19T17:38:00-07:00 (21 years ago) by Douglas Thrift
File size: 926 byte(s)
Log Message:
Check in?

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 169 #include <pstream.h>
11 Douglas Thrift 164
12 Douglas Thrift 169 #include "Matcher.hpp"
13 Douglas Thrift 164
14     class Person
15     {
16     private:
17 Douglas Thrift 166 string name;
18     vector<Person> multiple;
19 Douglas Thrift 164 public:
20     Person(const string& sn = "");
21 Douglas Thrift 166 Person(const Person& person) : name(person.name) {}
22 Douglas Thrift 164 ~Person() {}
23 Douglas Thrift 166 bool isMultiple() const { return !multiple.empty(); }
24     vector<Person>::const_iterator beginMultiple() const { return
25     multiple.begin(); }
26     vector<Person>::const_iterator endMultiple() const { return multiple.end();
27     }
28     void clearMultiple() { multiple.clear(); }
29     Person& operator=(const Person& person) { name = person.name; }
30 Douglas Thrift 167 bool operator==(const Person& person) const { return name == person.name; }
31     bool operator<(const Person& person) const { return name < person.name; }
32 Douglas Thrift 166 // friends:
33     friend ostream& operator<<(ostream& sout, const Person& person) { return
34     sout << person.name; }
35 Douglas Thrift 164 };
36    
37     #endif // _Person_hpp_

Properties

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