Field3D
PluginLoader.h
Go to the documentation of this file.
00001 //----------------------------------------------------------------------------//
00002 
00003 /*
00004  * Copyright (c) 2009 Sony Pictures Imageworks Inc
00005  *
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * Redistributions of source code must retain the above copyright
00013  * notice, this list of conditions and the following disclaimer.
00014  * Redistributions in binary form must reproduce the above copyright
00015  * notice, this list of conditions and the following disclaimer in the
00016  * documentation and/or other materials provided with the
00017  * distribution.  Neither the name of Sony Pictures Imageworks nor the
00018  * names of its contributors may be used to endorse or promote
00019  * products derived from this software without specific prior written
00020  * permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00025  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
00026  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00027  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00028  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00029  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00030  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00031  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00032  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00033  * OF THE POSSIBILITY OF SUCH DAMAGE.
00034  */
00035 
00036 //----------------------------------------------------------------------------//
00037 
00042 //----------------------------------------------------------------------------//
00043 
00044 #ifndef _INCLUDED_Field3D_PluginLoader_H_
00045 #define _INCLUDED_Field3D_PluginLoader_H_
00046 
00047 #include <string>
00048 #include <vector>
00049 
00050 //----------------------------------------------------------------------------//
00051 
00052 #include "ns.h"
00053 
00054 FIELD3D_NAMESPACE_OPEN
00055 
00056 //----------------------------------------------------------------------------//
00057 // PluginLoader
00058 //----------------------------------------------------------------------------//
00059 
00066 //----------------------------------------------------------------------------//
00067 
00068 class PluginLoader
00069 {
00070     
00071 public:
00072     
00073   // Constructors --------------------------------------------------------------
00074 
00076   PluginLoader();
00078   ~PluginLoader();
00079  
00080   // Main methods --------------------------------------------------------------
00081 
00083   static void loadPlugins();
00084 
00085 #if 0
00086 
00087   bool resolveGlobalsForPlugins(const char *dso);
00088   bool getDso(char *cptr,const char *dso, std::string &dsoPath);
00089 #endif
00090 
00091 private:
00092   
00093   // Private data members ------------------------------------------------------
00094 
00096   static std::vector<std::string> ms_pluginsLoaded;
00097 
00098 };
00099 
00100 //----------------------------------------------------------------------------//
00101 // Utility functions 
00102 //----------------------------------------------------------------------------//
00103 
00104 bool getDirSos(std::vector<std::string> &sos, std::string &dir);
00105 
00106 //----------------------------------------------------------------------------//
00107 
00108 FIELD3D_NAMESPACE_HEADER_CLOSE
00109 
00110 //----------------------------------------------------------------------------//
00111 
00112 #endif // Include guard