00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 #if !defined SOALGORITHMS_H 00024 #define SOALGORITHMS_H 00025 00026 #ifdef _MSC_VER 00027 #pragma warning( push ) 00028 #pragma warning(disable:4251) 00029 #endif 00030 00031 00032 #include <Inventor/SbString.h> 00033 #include <Inventor/algorithms/SoAlgorithmsDefs.h> 00034 #include <Inventor/STL/vector> 00035 #include <Inventor/threads/SbThreadMutex.h> 00036 00037 #include <Inventor/SoModule.h> 00038 SO_MODULE_HEADER(SoAlgorithms, __INVENTORALGORITHMSDLL) 00039 00040 class SoBufferObject; 00041 class SoDeviceContext; 00042 00043 class SoDataExtract; 00044 class SoSeismic; 00045 class SoConversion; 00046 class SoConvolution; 00047 class SoArithmetic; 00048 class SoLDMAlgorithms; 00049 00057 #define DECLARE_ALGORITHMS_MODULE( CLASS_NAME ) \ 00058 extern "C" VC_DLL_EXPORT SoAlgorithms* createAlgorithmsInterface() \ 00059 { \ 00060 CLASS_NAME::init(); \ 00061 return new CLASS_NAME(); \ 00062 } 00063 00078 class SoAlgorithms 00079 { 00080 public: 00081 00084 static void init(); 00085 00089 static bool isInitialized(); 00090 00093 static void finish(); 00094 00096 SoAlgorithms(); 00097 00099 virtual ~SoAlgorithms(); 00100 00112 static SoAlgorithms* loadAlgorithmsModule( const SbString& moduleFileName ); 00113 00123 static SbBool unloadAlgorithmsModule( const SbString& moduleFileName ); 00124 00133 virtual SoBufferObject* createBufferObject(); 00134 00141 virtual SoDeviceContext* createContext(); 00142 00143 00150 virtual SoDataExtract* createDataExtractInterface(); 00151 00152 00159 virtual SoSeismic* createSeismicInterface(); 00160 00161 00162 00169 virtual SoConversion* createConversionInterface(); 00170 00171 00178 virtual SoConvolution* createConvolutionInterface(); 00179 00180 00187 virtual SoArithmetic* createArithmeticInterface(); 00188 00189 00190 private: 00197 virtual SoLDMAlgorithms* createLDMAlgorithmsInterface(); 00198 00199 private: 00200 00202 static SbThreadMutex s_initThreadMutex; 00203 00204 private: 00205 00207 struct Module 00208 { 00209 SbString name; 00210 void* func; 00211 unsigned int refCount; 00212 }; 00213 00215 static std::vector< Module* > s_loadedModules; 00216 00218 static int s_initRefCount; 00219 }; 00220 00221 #ifdef _MSC_VER 00222 #pragma warning( pop ) 00223 #endif 00224 00225 #endif // SOALGORITHMS_H 00226 00227