Skip to content

Instantly share code, notes, and snippets.

@sunmeat
Forked from EnaEd/init.cpp
Created May 30, 2026 08:13
Show Gist options
  • Select an option

  • Save sunmeat/947b9a65ab06dad40cbf1e83706d15f3 to your computer and use it in GitHub Desktop.

Select an option

Save sunmeat/947b9a65ab06dad40cbf1e83706d15f3 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();
@sunmeat

sunmeat commented May 30, 2026

Copy link
Copy Markdown
Author

дякую!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment