====== Facade 패턴 ====== ===== 타입 ===== Structural Pattern ===== 문제 ===== 클래스가 많고 인터페이스가 복잡하다. ===== 해결 ===== 여러 개의 클래스 또는 인터페이스를 순차적으로 호출하는 클래스를 만든다. ===== 클래스 다이어그램 ===== {{:programming:design_pattern:facade.png|}} ===== 예제 ===== /*Facade is one of the easiest patterns I think... And this is very simple example.    Imagine you set up a smart house where everything is on remote. So to turn the lights on you push lights on button - And same for TV, AC, Alarm, Music, etc...    When you leave a house you would need to push a 100 buttons to make sure everything is off and are good to go which could be little annoying if you are lazy like me so I defined a Facade for leaving and coming back. (Facade functions represent buttons...) So when I come and leave I just make one call and it takes care of everything...    */    #include #include    using namespace std;    class Alarm { public:     void alarmOn()     {         cout<<"Alarm is on and house is secured"< ===== 참고 ===== http://en.wikibooks.org/wiki/C%2B%2B_Programming/Code/Design_Patterns#Facade