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-2020 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, __INVALGORITHMSDLL) 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 00079 class SoAlgorithms 00080 { 00081 public: 00082 00085 static void init(); 00086 00090 static bool isInitialized(); 00091 00094 static void finish(); 00095 00097 SoAlgorithms(); 00098 00100 virtual ~SoAlgorithms(); 00101 00113 static SoAlgorithms* loadAlgorithmsModule( const SbString& moduleFileName ); 00114 00124 static SbBool unloadAlgorithmsModule( const SbString& moduleFileName ); 00125 00134 virtual SoBufferObject* createBufferObject(); 00135 00142 virtual SoDeviceContext* createContext(); 00143 00144 00151 virtual SoDataExtract* createDataExtractInterface(); 00152 00153 00160 virtual SoSeismic* createSeismicInterface(); 00161 00162 00163 00170 virtual SoConversion* createConversionInterface(); 00171 00172 00179 virtual SoConvolution* createConvolutionInterface(); 00180 00181 00188 virtual SoArithmetic* createArithmeticInterface(); 00189 00190 00191 private: 00198 virtual SoLDMAlgorithms* createLDMAlgorithmsInterface(); 00199 00200 private: 00201 00203 static SbThreadMutex s_initThreadMutex; 00204 00205 private: 00206 00208 struct Module 00209 { 00210 SbString name; 00211 void* func; 00212 unsigned int refCount; 00213 }; 00214 00216 static std::vector< Module* > s_loadedModules; 00217 00219 static int s_initRefCount; 00220 }; 00221 00222 #ifdef _MSC_VER 00223 #pragma warning( pop ) 00224 #endif 00225 00226 #endif // SOALGORITHMS_H 00227 00228