Modern C++ Design Pattern/Chapter 10. 퍼사드

created : 2020-04-09T14:56:51+00:00
modified : 2020-09-26T14:21:33+00:00
cpp design pattern facade

퍼사드는 어디에 있는가?

struct Console
{
  vector<Viewport*> viewports;
  Size charSize, gridSize;
};

Console::Console(bool fullscreen, int char_width, int char_height,
  int width, int height, optional<Size> client_size)
{
  // Implement
}

Console::Console(const ConsoleCreateionParamters* ccp) { ... }

struct ConsoleCreationParameters
{
  optional<Size> client_size;
  int character_width{10};
  int character_height{14};
  int width{20};
  int height{30};
  bool fullscreen{false};
  bool create_default_view_and_buffer{true};
};

요약