24 #ifndef GOBY_MIDDLEWARE_APPLICATION_DETAIL_THREAD_TYPE_SELECTOR_H
25 #define GOBY_MIDDLEWARE_APPLICATION_DETAIL_THREAD_TYPE_SELECTOR_H
36 template <
typename ThreadType,
typename ThreadConfig,
bool has_index,
bool has_config>
42 template <
typename ThreadType,
typename ThreadConfig>
45 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index = -1)
47 return std::make_shared<ThreadType>(cfg);
52 template <
typename ThreadType,
typename ThreadConfig>
55 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index)
57 return std::make_shared<ThreadType>(cfg, index);
62 template <
typename ThreadType,
typename ThreadConfig>
65 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index = -1)
67 return std::make_shared<ThreadType>();
72 template <
typename ThreadType,
typename ThreadConfig>
75 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index)
77 return std::make_shared<ThreadType>(index);