|
| 1 | +/* |
| 2 | + * nest_extension_interface.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 NEST_EXTENSION_INTERFACE_H |
| 24 | +#define NEST_EXTENSION_INTERFACE_H |
| 25 | + |
| 26 | +// Includes from nestkernel; placed here so module developer does not need to |
| 27 | +// include them manually |
| 28 | +#include "config.h" |
| 29 | +#include "connection_manager_impl.h" |
| 30 | +#include "connector_model_impl.h" |
| 31 | +#include "exceptions.h" |
| 32 | +#include "genericmodel.h" |
| 33 | +#include "genericmodel_impl.h" |
| 34 | +#include "io_manager_impl.h" |
| 35 | +#include "kernel_manager.h" |
| 36 | +#include "model.h" |
| 37 | +#include "model_manager_impl.h" |
| 38 | +#include "nest.h" |
| 39 | +#include "nest_impl.h" |
| 40 | +#include "nestmodule.h" |
| 41 | +#include "target_identifier.h" |
| 42 | + |
| 43 | +// C++ includes |
| 44 | +#include <string> |
| 45 | + |
| 46 | +/** |
| 47 | + * Interface for NEST Extenstion Modules. |
| 48 | + * |
| 49 | + * All NEST Extension Modules must be derived from this interface class. |
| 50 | + * |
| 51 | + * Method init() will be called after the module is loaded. |
| 52 | + * |
| 53 | + * The constructor should be empty. |
| 54 | + */ |
| 55 | + |
| 56 | +class NESTExtensionInterface |
| 57 | +{ |
| 58 | +public: |
| 59 | + virtual ~NESTExtensionInterface() |
| 60 | + { |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Initialize module, register all components with kernel |
| 65 | + */ |
| 66 | + virtual void init() = 0; |
| 67 | + |
| 68 | + //! Name of module |
| 69 | + virtual std::string name() = 0; |
| 70 | + |
| 71 | + //! Contact information |
| 72 | + virtual std::string contact() = 0; |
| 73 | + |
| 74 | + //! Website |
| 75 | + virtual std::string url() = 0; |
| 76 | + |
| 77 | + //! Permanent URI |
| 78 | + virtual std::string uri() = 0; |
| 79 | +}; |
| 80 | + |
| 81 | +#endif // #ifndef NEST_EXTENSION_INTERFACE_H |
0 commit comments