| 204 | |
| 205 | template<typename R> |
| 206 | module::Channel<R>* |
| 207 | Channel ::build() const |
| 208 | { |
| 209 | try |
| 210 | { |
| 211 | return build_gaussian<R>(); |
| 212 | } |
| 213 | catch (spu::tools::cannot_allocate&) |
| 214 | { |
| 215 | } |
| 216 | |
| 217 | try |
| 218 | { |
| 219 | return build_event<R>(); |
| 220 | } |
| 221 | catch (spu::tools::cannot_allocate&) |
| 222 | { |
| 223 | } |
| 224 | |
| 225 | if (type == "USER") return new module::Channel_user<R>(this->N, this->path, this->add_users); |
| 226 | if (type == "USER_ADD") return new module::Channel_user_add<R>(this->N, this->path, this->add_users); |
| 227 | if (type == "USER_BEC") return new module::Channel_user_be<R>(this->N, this->path); |
| 228 | if (type == "USER_BSC") return new module::Channel_user_bs<R>(this->N, this->path); |
| 229 | if (type == "NO") return new module::Channel_NO<R>(this->N, this->add_users); |
| 230 | |
| 231 | throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__); |
| 232 | } |
| 233 | |
| 234 | template<typename R> |
| 235 | module::Channel<R>* |
nothing calls this directly
no outgoing calls
no test coverage detected