Last active
March 23, 2016 05:18
-
-
Save rightson/63af4ce70c7ffd8459e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WebBrowser { | |
public: | |
// ... | |
void clearCache(); | |
void clearHistory(); | |
void removeCookies(); | |
// ... | |
}; | |
class WebBrowser { | |
public: | |
// ... | |
void clearEverything(); // calls clearCache, clearHistory, removeCookies | |
// ... | |
}; | |
void clearBrowser(WebBrowser& wb) { | |
wb.clearCache(); | |
wb.clearHistory(); | |
wb.removeCookies(); | |
} | |
namespace WebBrowserStuff { | |
class WebBrowser { ... }; | |
void clearBrowser(WebBrowser& wb); | |
} | |
// header "webbrowser.h" — header for class WebBrowser itself | |
// as well as "core" WebBrowser-related functionality | |
namespace WebBrowserStuff { | |
class WebBrowser { ... }; | |
// "core" related functionality, | |
// e.g. non-member functions almost all clients need | |
} | |
// header "webbrowserbookmarks.h" | |
namespace WebBrowserStuff { | |
// bookmark-related convenience functions | |
} | |
// header "webbrowsercookies.h" | |
namespace WebBrowserStuff { | |
// cookie-related convenience functions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment