virtual_library.h

Go to the documentation of this file.
00001 #ifndef VIRTUAL_LIBRARY_CLASS
00002 #define VIRTUAL_LIBRARY_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : virtual_library                                                   *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2000-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include <basis/definitions.h>
00019 #include "opsysdll.h"
00020 
00022 
00029 namespace library_plugins {
00030 
00032   class OPSYSTEM_CLASS_STYLE vl_data_pack { public: virtual ~vl_data_pack(); };
00033 
00034   class OPSYSTEM_CLASS_STYLE virtual_library
00035   { 
00036   public:
00037     virtual ~virtual_library();  
00038 
00039     virtual virtual_library *create_instance(vl_data_pack &parameters) = 0;
00041 
00046   };
00047 
00049 
00056   #define DEFINE_VIRTUAL_LIBRARY(library_class_name) \
00057     extern "C" { \
00058       virtual_library HOOPLE_DLL_EXPORT_FUNCTION *static_create_instance \
00059           (vl_data_pack &parameters) \
00060       { library_class_name blank; return blank.create_instance(parameters); } \
00061     }
00062 
00064 
00066   #define STATIC_CREATE_INSTANCE_NAME "static_create_instance"
00067 
00068 } // namespace.
00069 
00070 #endif // outer guard
00071 

Generated on Fri Nov 21 04:29:56 2008 for HOOPLE Libraries by  doxygen 1.5.1