1 /* 2 * genericmodel_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 GENERICMODEL_IMPL_H 24 #define GENERICMODEL_IMPL_H 25 26 #include "genericmodel.h" 27 28 // Includes from nestkernel: 29 #include "kernel_manager.h" 30 #include "logging_manager.h" 31 32 namespace nest 33 { 34 35 template < typename ElementT > 36 void deprecation_warning(const std::string & caller)37GenericModel< ElementT >::deprecation_warning( const std::string& caller ) 38 { 39 if ( deprecation_warning_issued_ or deprecation_info_.empty() ) 40 { 41 return; 42 } 43 44 if ( not deprecation_info_.empty() ) 45 { 46 LOG( M_DEPRECATED, caller, "Model " + get_name() + " is deprecated in " + deprecation_info_ + "." ); 47 } 48 49 deprecation_warning_issued_ = true; 50 } 51 } 52 #endif 53