00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SO_MODULE
00026 #define SO_MODULE
00027
00028 #include <Inventor/SbBase.h>
00029 #include <Inventor/sys/port.h>
00030 #include <SoVersion.h>
00031
00040 class SoModuleCheck
00041 {
00042 public:
00044 SoModuleCheck( const bool is_secure_scl);
00045
00049 SoModuleCheck( const int so_version_deprecated_error );
00050
00054 static const char* getCompilerString();
00055
00059 static const char* getPlatformString();
00060
00062 static const char* getInternalBuildString();
00063
00065 static bool isDebug();
00066
00068 static bool isSCLFlag();
00069
00073 static int getProductVersion();
00074 };
00075
00076 #ifndef HIDDEN_FROM_DOC
00077
00078 #ifdef LIBRARYBUILD
00079
00080 class SoModule
00081 {
00082 private:
00083 SoModule( const char* libName,
00084 const char* version,
00085 const char* compiler,
00086 const char* plateform,
00087 const bool debug,
00088 const bool SO_UNUSED_PARAM(is_secure_scl) );
00089 private:
00090 SoModule() {};
00091 };
00092
00093 #include <SoVersion.h>
00094 #include <SoResourcePreproc.i>
00095 #if defined(_DEBUG)
00096 #define IS_DEBUG 1
00097 #else
00098 #define IS_DEBUG 0
00099 #endif
00100
00101 #if !defined(_SECURE_SCL) || (_SECURE_SCL==1)
00102 #define IS_SECURE_SCL 1
00103 #else
00104 #define IS_SECURE_SCL 0
00105 #endif
00106
00107 #define SO_MODULE_HEADER( className, libName) \
00108 class className##Module : public SoModule \
00109 { \
00110 public: \
00111 className##Module() \
00112 : SoModule( libName, SO_PRODUCT_VERSION, COMPILER_STRING, SO_PRODUCT_STRING_PLATFORM, IS_DEBUG , IS_SECURE_SCL) {} \
00113 };
00114
00115 #define SO_MODULE_SOURCE( className, productName ) \
00116 const char* s_versionString_##className##Module = "@(#) " productName " for " SO_PRODUCT_STRING_PLATFORM " built with " COMPILER_STRING "\n@(#) " SO_FULL_VERSION_DOTTED_STRING "." TYPE_BUILD_VERSION "." INTERNAL_BUILD_KEY "\n" SO_UNIX_LEGAL_COPYRIGHT; \
00117 className##Module g_##className##Module
00118
00119 #else
00120 #define SO_MODULE_HEADER( className, libName)
00121 #define SO_MODULE_SOURCE( className, productName) ;
00122
00123 #endif // LIBRARY_BUILD
00124
00125 #endif // HIDDEN_FROM_DOC
00126
00127 #endif // SO_MODULE
00128
00129
00130