Skip to content

Instantly share code, notes, and snippets.

@RobertLarson
RobertLarson / IPhone8TextApp.h
Created June 10, 2017 01:19
IPhone8TextApp.h
#include "CellPhoneTextApp.h"
class CellPhoneTextAppImpl;
class IPhone8TextApp : public CellPhoneTextApp {
public:
IPhone8TextApp(CellPhoneTextAppImpl * impl);
virtual ~IPhone8TextApp();
@RobertLarson
RobertLarson / GalaxyS8TextApp.cpp
Created June 10, 2017 01:18
GalaxyS8TextApp.cpp
#include "GalaxyS8TextApp.h"
#include <iostream>
GalaxyS8TextApp::GalaxyS8TextApp(CellPhoneTextAppImpl * impl)
: CellPhoneTextApp(impl) {
}
GalaxyS8TextApp::~GalaxyS8TextApp() {
@RobertLarson
RobertLarson / GalaxyS8TextApp.h
Created June 10, 2017 01:17
GalaxyS8TextApp.h
#include "CellPhoneTextApp.h"
class CellPhoneTextAppImpl;
class GalaxyS8TextApp : public CellPhoneTextApp {
public:
GalaxyS8TextApp(CellPhoneTextAppImpl * impl);
virtual ~GalaxyS8TextApp();
virtual void Open();
@RobertLarson
RobertLarson / CellPhoneTextApp.cpp
Created June 10, 2017 01:16
CellPhoneTextApp.cpp
#include "CellPhoneTextApp.h"
#include "CellPhoneTextAppImpl.h"
CellPhoneTextApp::CellPhoneTextApp(CellPhoneTextAppImpl * impl)
: m_pImpl(impl) {
}
CellPhoneTextApp::~CellPhoneTextApp() {
}
@RobertLarson
RobertLarson / CellPhoneTextApp.h
Created June 10, 2017 01:13
CellPhoneTextApp.h
class CellPhoneTextAppImpl;
class CellPhoneTextApp {
public:
CellPhoneTextApp(CellPhoneTextAppImpl * impl);
virtual ~CellPhoneTextApp();
virtual void Open() = 0;
virtual void Close() = 0;
@RobertLarson
RobertLarson / ZooProxyTest.cpp
Created May 23, 2017 02:43
ZooProxyTest.cpp
int main()
{
ZooMember member(std::string("Nicklas"));
ZooGuest guest(std::string("Bob"));
Zoo zoo;
ZooProxy zooProxy(&zoo);
zooProxy.EnterZooEarly(&member);
@RobertLarson
RobertLarson / ZooProxy.cpp
Last active May 23, 2017 02:55
ZooProxy.cpp
ZooProxy::ZooProxy(Zoo * zoo)
: m_pZoo(zoo)
{
}
ZooProxy::~ZooProxy() {
}
void ZooProxy::EnterZooEarly(ZooPatron * patron)
class ZooProxy {
public:
ZooProxy(Zoo * zoo);
virtual ~ZooProxy();
virtual void EnterZooEarly(ZooPatron * patron);
virtual void AttendAnimalShow(ZooPatron * patron);
private:
Zoo * m_pZoo;
Zoo::Zoo() {
}
Zoo::~Zoo() {
}
void Zoo::EnterZooEarly(ZooPatron * patron)
{
std::cout << "Welcome, " << patron->GetName() << ", to our early access zoo hours\n";
class Zoo {
public:
Zoo();
virtual ~Zoo();
virtual void EnterZooEarly(ZooPatron * patron);
virtual void AttendAnimalShow(ZooPatron * patron);
};