00001 #ifndef K3DSDK_IPLUGIN_FACTORY_H 00002 #define K3DSDK_IPLUGIN_FACTORY_H 00003 00004 // K-3D 00005 // Copyright (c) 1995-2004, Timothy M. Shead 00006 // 00007 // Contact: tshead@k-3d.com 00008 // 00009 // This program is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU General Public 00011 // License as published by the Free Software Foundation; either 00012 // version 2 of the License, or (at your option) any later version. 00013 // 00014 // This program is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public 00020 // License along with this program; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 00028 #include <k3dsdk/iunknown.h> 00029 #include <k3dsdk/uuid.h> 00030 00031 #include <iosfwd> 00032 #include <map> 00033 #include <string> 00034 #include <typeinfo> 00035 #include <vector> 00036 00037 namespace k3d 00038 { 00039 00041 class iplugin_factory : 00042 public virtual iunknown 00043 { 00044 public: 00046 typedef enum 00047 { 00048 STABLE, 00049 EXPERIMENTAL, 00050 DEPRECATED 00051 } quality_t; 00052 00054 typedef std::vector<std::string> categories_t; 00056 typedef std::vector<const std::type_info*> interfaces_t; 00058 typedef std::map<std::string, std::string> metadata_t; 00059 00061 virtual const k3d::uuid& factory_id() = 0; 00063 virtual const std::string name() = 0; 00065 virtual const std::string short_description() = 0; 00067 virtual const categories_t& categories() = 0; 00069 virtual quality_t quality() = 0; 00071 virtual bool implements(const std::type_info& InterfaceType) = 0; 00073 virtual const interfaces_t interfaces() = 0; 00075 virtual metadata_t metadata() = 0; 00076 00077 protected: 00078 iplugin_factory() {} 00079 iplugin_factory(const iplugin_factory& Other) : iunknown(Other) {} 00080 iplugin_factory& operator = (const iplugin_factory&) { return *this; } 00081 virtual ~iplugin_factory() {} 00082 }; 00083 00084 std::ostream& operator<<(std::ostream&, const iplugin_factory::quality_t&); 00085 std::istream& operator>>(std::istream&, iplugin_factory::quality_t&); 00086 00087 } // namespace k3d 00088 00089 #endif // !K3DSDK_IPLUGIN_FACTORY_H 00090
1.6.3