st1main.cpp

来自「c#设计模式WithCla」· C++ 代码 · 共 31 行

CPP
31
字号
#include "controll.h"

int main ()
{ 
  //Use with ST1STATE.OMT and ST1HEAD1.SCT, ST1FUNC1.SCT, ST1HEAD2.SCT, and ST1FUNC2.SCT        
  //Controller controller1;
  //controller1.process (turnOn);
  //controller1.process (turnOff);
  //return 0;

  //Use with ST1STATE.OMT and ST1HEAD3.SCT and ST1FUNC3.SCT, ST1HEAD5.SCT, ST1FUNC5.SCT         
  Controller controller1;
  controller1.turnOn (1);
  controller1.turnOff ();
  return 0;

  //Use with ST1STATE.OMT and ST1HEAD4.SCT and ST1FUNC4.SCT     
  //pOffState = new OffState();
  //pOnState = new OnState();
  //State *pCurrentState;
  //pCurrentState = pOffState;
  //pCurrentState = pCurrentState->turnOn(1);     
  //pCurrentState = pCurrentState->turnOff();    
  //return 0;

  //Use with ST1STATE.OMT and ST1C1.SCT and ST1C2.SCT 
  //process (turnOn);
  //process (turnOff);
  //return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?