00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*- 00002 00003 // -- BEGIN LICENSE BLOCK ---------------------------------------------- 00004 // This file is part of FZIs ic_workspace. 00005 // 00006 // This program is free software licensed under the LGPL 00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3). 00008 // You can find a copy of this license in LICENSE folder in the top 00009 // directory of the source code. 00010 // 00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany 00012 // 00013 // -- END LICENSE BLOCK ------------------------------------------------ 00014 00015 //---------------------------------------------------------------------- 00023 //---------------------------------------------------------------------- 00024 #include "icl_core_plugin/PluginManagerBase.h" 00025 00026 namespace icl_core { 00027 namespace plugin { 00028 00029 PluginManagerBase::PluginManagerBase(std::string plugin_dir) 00030 { 00031 addPluginPath(plugin_dir); 00032 } 00033 00034 StringList PluginManagerBase::pluginPaths() 00035 { 00036 return m_plugin_paths; 00037 } 00038 00039 void PluginManagerBase::addPluginPath(const std::string &path) 00040 { 00041 if (path != "") 00042 { 00043 m_plugin_paths.push_back(path); 00044 } 00045 else 00046 { 00047 LOGGING_TRACE(Plugin, "Cannot use an empty plugin path" << icl_core::logging::endl); 00048 } 00049 } 00050 00051 StringList PluginManagerBase::errorMessages() 00052 { 00053 return m_error_messages; 00054 } 00055 00057 #ifdef _IC_BUILDER_DEPRECATED_STYLE_ 00058 00062 StringList PluginManagerBase::PluginPaths() 00063 { 00064 return pluginPaths(); 00065 } 00066 00070 void PluginManagerBase::AddPluginPath(const std::string &path) 00071 { 00072 addPluginPath(path); 00073 } 00074 00080 StringList PluginManagerBase::ErrorMessages() 00081 { 00082 return errorMessages(); 00083 } 00084 00085 #endif 00086 00087 00088 void PluginManagerBase::clearErrorMessages() 00089 { 00090 m_error_messages.clear(); 00091 } 00092 00093 void PluginManagerBase::addErrorMessage(const std::string &message) 00094 { 00095 m_error_messages.push_back(message); 00096 } 00097 00099 #ifdef _IC_BUILDER_DEPRECATED_STYLE_ 00100 00101 void PluginManagerBase::ClearErrorMessages() 00102 { 00103 clearErrorMessages(); 00104 } 00105 00106 void PluginManagerBase::AddErrorMessage(const std::string &message) 00107 { 00108 addErrorMessage(message); 00109 } 00110 00111 #endif 00112 00113 00114 } 00115 }