// Site Mapper // // Douglas Thrift // // $Id$ #ifndef _Page_hpp_ #define _Page_hpp_ #include "SiteMapper.hpp" class Page { private: string address; string path; string title; vector children; public: Page(const string& address, const string& path, const string& title); Page(const string& url); ~Page() {} string& getAddress(void) { return address; } string& getPath(void) { return path; } string& getTitle(void) { return title; } vector& getChildren(void) { return children; } string getUrl(void) { return "http://" + address + path; } void setAddress(const string& address) { this->address = address; } void setPath(const string& path) { this->path = path; } void setTitle(const string& title) { this->title = title; } void setChildren(vector& children) { this->children = children; } void setUrl(const string& url); bool operator==(const string& thing); bool operator==(Page& page); bool operator!=(const string& thing) { return !(*this == thing); } bool operator!=(Page& page) { return !(*this == page); } bool operator<(Page& page); bool operator>(Page& page); // friends: friend bool operator==(const string& thing, Page& page) { return page == thing; } friend bool operator!=(const string& thing, Page& page) { return page == thing; } }; #endif // _Page_hpp_