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

Comparing Smersh/Person.hpp (file contents):
Revision 164 by Douglas Thrift, 2004-06-17T22:12:33-07:00 vs.
Revision 166 by Douglas Thrift, 2004-06-18T22:24:07-07:00

# Line 14 | Line 14
14   class Person
15   {
16   private:
17 +        string name;
18 +        vector<Person> multiple;
19   public:
20          Person(const string& sn = "");
21 +        Person(const Person& person) : name(person.name) {}
22          ~Person() {}
23 +        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 + // friends:
31 +        friend ostream& operator<<(ostream& sout, const Person& person) { return
32 +                sout << person.name; }
33   };
34  
35   #endif // _Person_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines