Skip to content

Instantly share code, notes, and snippets.

@EnaEd
Created May 30, 2026 08:12
Show Gist options
  • Select an option

  • Save EnaEd/d577e5fe8bb85d093d3a582810e7c900 to your computer and use it in GitHub Desktop.

Select an option

Save EnaEd/d577e5fe8bb85d093d3a582810e7c900 to your computer and use it in GitHub Desktop.
int main() {
/// Choose task theme to test program behavior
/// naming rule: ThemeTask has the same Name as target class with postfix Task
/// <sample> auto task = TaskTheme::GreetingTask; </sample>
/// by defaulttask has pointer to lastest work
auto taskTheme = static_cast<TaskTheme>(static_cast<int>(TaskTheme::LastOneMark) - 1);
TaskFactory factory;
auto task = factory.GetTask(taskTheme);
if (task == nullptr) {
cout << "Task theme not found\n";
return 0;
}
task->Run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment