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/sys/port.h>
00029 #include <SoVersion.h>
00030
00039 class SoModuleCheck
00040 {
00041 public:
00043 SoModuleCheck( const bool is_secure_scl);
00044
00048 SoModuleCheck( const int so_version_deprecated_error );
00049
00053 static const char* getCompilerString();
00054
00058 static const char* getPlatformString();
00059
00061 static const char* getInternalBuildString();
00062
00064 static bool isDebug();
00065
00067 static bool isSCLFlag();
00068
00072 static int getProductVersion();
00073 };
00074
00075 #ifndef HIDDEN_FROM_DOC
00076
00077 #ifdef LIBRARYBUILD
00078
00079 class SoModule
00080 {
00081 private:
00082 SoModule( const char* libName,
00083 const char* version,
00084 const char* compiler,
00085 const char* plateform,
00086 const bool debug,
00087 const bool is_secure_scl );
00088 private:
00089 SoModule() {};
00090 };
00091
00092 #include <SoVersion.h>
00093 #include <SoResourcePreproc.i>
00094 #if defined(_DEBUG)
00095 #define IS_DEBUG 1
00096 #else
00097 #define IS_DEBUG 0
00098 #endif
00099
00100 #if !defined(_SECURE_SCL) || (_SECURE_SCL==1)
00101 #define IS_SECURE_SCL 1
00102 #else
00103 #define IS_SECURE_SCL 0
00104 #endif
00105
00106 #define SO_MODULE_HEADER( className, libName) \
00107 class className##Module : public SoModule \
00108 { \
00109 public: \
00110 className##Module() \
00111 : SoModule( libName, SO_PRODUCT_VERSION, COMPILER_STRING, SO_PRODUCT_STRING_PLATFORM, IS_DEBUG , IS_SECURE_SCL) {} \
00112 };
00113
00114 #define SO_MODULE_SOURCE( className, productName ) \
00115 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; \
00116 className##Module g_##className##Module
00117
00118 #else
00119 #define SO_MODULE_HEADER( className, libName)
00120 #define SO_MODULE_SOURCE( className, productName) ;
00121
00122 #endif // LIBRARY_BUILD
00123
00124 #endif // HIDDEN_FROM_DOC
00125
00126 #endif // SO_MODULE
00127
00128
00129