24#ifndef GOBY_MIDDLEWARE_APPLICATION_DETAIL_THREAD_TYPE_SELECTOR_H
25#define GOBY_MIDDLEWARE_APPLICATION_DETAIL_THREAD_TYPE_SELECTOR_H
36template <
typename ThreadType,
typename ThreadConfig,
bool has_index,
bool has_config>
42template <
typename ThreadType,
typename ThreadConfig>
45 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index = -1)
47 return std::make_shared<ThreadType>(cfg);
52template <
typename ThreadType,
typename ThreadConfig>
55 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index)
57 return std::make_shared<ThreadType>(cfg, index);
62template <
typename ThreadType,
typename ThreadConfig>
65 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index = -1)
67 return std::make_shared<ThreadType>();
72template <
typename ThreadType,
typename ThreadConfig>
75 static std::shared_ptr<ThreadType>
thread(
const ThreadConfig& cfg,
int index)
77 return std::make_shared<ThreadType>(index);
detail namespace with internal helper functions
The global namespace for the Goby project.
static std::shared_ptr< ThreadType > thread(const ThreadConfig &cfg, int index=-1)
static std::shared_ptr< ThreadType > thread(const ThreadConfig &cfg, int index=-1)
static std::shared_ptr< ThreadType > thread(const ThreadConfig &cfg, int index)
static std::shared_ptr< ThreadType > thread(const ThreadConfig &cfg, int index)
Selects which constructor to use based on whether the thread is launched with an index or not (that i...