ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Search/Page.hpp
(Generate patch)

Comparing:
trunk/Search/Page.h (file contents), Revision 1 by douglas, 2002-12-04T20:22:59-08:00 vs.
trunk/Search/Page.hpp (file contents), Revision 360 by Douglas Thrift, 2004-08-19T20:09:52-07:00

# Line 1 | Line 1
1   /* ============================================================================
2   * Douglas Thrift's Search Engine License
3   *
4 < * Copyright (C) 2002, Douglas Thrift. All Rights Reserved.
4 > * Copyright (C) 2002-2004, Douglas Thrift. All Rights Reserved.
5   * Redistribution and use in source and binary forms, with or without
6   * modification, are permitted provided that the following conditions are met:
7   *
# Line 46 | Line 46
46   //
47   // Douglas Thrift
48   //
49 < // Page.h
49 > // $Id$
50  
51 < #ifndef _Page_h_
52 < #define _Page_h_
51 > #ifndef _Page_hpp_
52 > #define _Page_hpp_
53  
54 < #include "Search.h"
55 < #include "URL.h"
54 > #include "Search.hpp"
55 > #include "URL.hpp"
56  
57   class Page : public URL
58   {
59   private:
60          unsigned size;
61 <        string title;
62 <        string description;
63 <        string text;
61 >        string title, description, text;
62          vector<string> headings;
63   public:
64 <        Page() { size = 0; }
65 <        Page(string& url);
64 >        Page() : size(0) {}
65 >        Page(string& url) : URL(url), size(0) {}
66          ~Page() {}
67 <        unsigned getSize() { return size; }
68 <        virtual string getTitle() { return title; }
69 <        virtual string getDescription() { return description; }
70 <        string getText() { return text; }
71 <        vector<string> getHeadings() { return headings; }
72 <        void setSize(unsigned size);
73 <        void setTitle(string& title);
74 <        void setDescription(string& description);
75 <        void setText(string& text);
76 <        void setHeadings(vector<string>& headings);
67 >        unsigned getSize() const { return size; }
68 >        virtual const string& getTitle() const { return title; }
69 >        virtual const string& getDescription() const { return description; }
70 >        const string& getText() const { return text; }
71 >        const vector<string>& getHeadings() const { return headings; }
72 >        void setSize(unsigned size) { this->size = size; }
73 >        void setTitle(const string& title) { this->title = title; }
74 >        void setDescription(const string& description)
75 >        { this->description = description; }
76 >        void setText(const string& text) { this->text = text; }
77 >        void setHeadings(const vector<string>& headings)
78 >        { this->headings = headings; }
79   // friends:
80          friend istream& operator>>(istream& is, Page& data);
81          friend ostream& operator<<(ostream& os, Page& data);
82   };
83  
84 < #endif // _Page_h_
84 > #endif // _Page_hpp_

Comparing:
trunk/Search/Page.h (property svn:eol-style), Revision 1 by douglas, 2002-12-04T20:22:59-08:00 vs.
trunk/Search/Page.hpp (property svn:eol-style), Revision 360 by Douglas Thrift, 2004-08-19T20:09:52-07:00

# Line 0 | Line 1
1 + native

Comparing:
trunk/Search/Page.h (property svn:keywords), Revision 1 by douglas, 2002-12-04T20:22:59-08:00 vs.
trunk/Search/Page.hpp (property svn:keywords), Revision 360 by Douglas Thrift, 2004-08-19T20:09:52-07:00

# Line 0 | Line 1
1 + Id

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines