/** * facade.h * Implemented by Blueprint Technologies, Inc. */ #ifndef _facade_h #define _facade_h /** * Implement subsystem functionality. Handle work assigned * by the Facade object. Have no knowledge of the facade; * that is, they keep no references to it. */ class Subsystem1 { public: void work() { // Do a part of a whole job. }; }; /** * Implement subsystem functionality. Handle work assigned * by the Facade object. Have no knowledge of the facade; * that is, they keep no references to it. */ class Subsystem2 { public: void work() { // Do a part of a whole job. }; }; /** * Implement subsystem functionality. Handle work assigned * by the Facade object. Have no knowledge of the facade; * that is, they keep no references to it. */ class Subsystem3 { public: void work() { // Do a part of a whole job. }; }; /** * Knows which subsystem classes are responsible for * a request. Delegates client requests to appropriate * subsystem objects. */ class Facade { private: Subsystem1 sub1; Subsystem2 sub2; Subsystem3 sub3; public: void go() { sub1.work(); sub2.work(); sub3.work(); }; }; #endif