NEST main@caf0ae8
 
Loading...
Searching...
No Matches
io_manager_impl.h
Go to the documentation of this file.
1/*
2 * io_manager_impl.h
3 *
4 * This file is part of NEST.
5 *
6 * Copyright (C) 2004 The NEST Initiative
7 *
8 * NEST is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * NEST is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef IO_MANAGER_IMPL_H
24#define IO_MANAGER_IMPL_H
25
26#include "io_manager.h"
27
28namespace nest
29{
30
31template < class RecordingBackendT >
32void
33IOManager::register_recording_backend( const std::string& name )
34{
35 if ( recording_backends_.find( name ) != recording_backends_.end() )
36 {
37 throw BackendAlreadyRegistered( name );
38 }
39
40 RecordingBackendT* recording_backend = new RecordingBackendT();
41 recording_backend->pre_run_hook();
42 recording_backends_.insert( std::make_pair( name, recording_backend ) );
43}
44
45template < class StimulationBackendT >
46void
48{
49 if ( stimulation_backends_.find( name ) != stimulation_backends_.end() )
50 {
51 throw BackendAlreadyRegistered( name );
52 }
53
54 StimulationBackendT* stimulation_backend = new StimulationBackendT();
55 stimulation_backend->pre_run_hook();
56 stimulation_backends_.insert( std::make_pair( name, stimulation_backend ) );
57}
58
59} // namespace nest
60
61#endif /* #ifndef IO_MANAGER_IMPL_H */
Definition exceptions.h:1670
void register_stimulation_backend(const std::string &)
Definition io_manager_impl.h:47
void register_recording_backend(const std::string &)
Definition io_manager_impl.h:33
std::map< std::string, StimulationBackend * > stimulation_backends_
A mapping from names to registered stimulation backends.
Definition io_manager.h:165
std::map< std::string, RecordingBackend * > recording_backends_
A mapping from names to registered recording backends.
Definition io_manager.h:160
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33