00001 /* 00002 * File Name: export_impl.cpp 00003 */ 00004 00005 /* 00006 * This file is part of uds-plugin-plaintext. 00007 * 00008 * uds-plugin-plaintext is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * uds-plugin-plaintext is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 /** 00023 * Copyright (C) 2008 iRex Technologies B.V. 00024 * All rights reserved. 00025 */ 00026 00027 #include <cassert> 00028 #include "export_impl.h" 00029 #include "library_impl.h" 00030 00031 #include "config.h" 00032 00033 /// @brief Return the highest API version this plugin supports. 00034 const char* get_version() 00035 { 00036 return VERSION; 00037 } 00038 00039 /// @brief Create a new plugin library instance and return 00040 /// the IPluginUnknown interface of the instance. 00041 /// Currently, this function is not allowed to be called twice. 00042 IPluginUnknown* create_plugin_library() 00043 { 00044 using namespace text; 00045 static PluginLibraryImpl * library; 00046 if (library == NULL) 00047 { 00048 library = new PluginLibraryImpl; 00049 return static_cast<IPluginUnknown *>(library); 00050 } 00051 assert(false); 00052 return 0; 00053 } 00054