Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoModule.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Nicolas DAGUISE (Apr 2009)
22**=======================================================================*/
23
24
25#ifndef SO_MODULE
26#define SO_MODULE
27
28#include <Inventor/SbBase.h>
29#include <Inventor/sys/port.h>
30#include <SoVersion.h>
31
41{
42public:
44 SoModuleCheck( const bool is_secure_scl);
45
49 SoModuleCheck( const int so_version_deprecated_error );
50
54 static const char* getCompilerString();
55
59 static const char* getPlatformString();
60
62 static const char* getInternalBuildString();
63
65 static bool isDebug();
66
68 static bool isSCLFlag();
69
73 static int getProductVersion();
74};
75
76#ifndef HIDDEN_FROM_DOC
77
78#ifdef LIBRARYBUILD
79
80class SoModule
81{
82private:
83 SoModule( const char* libName,
84 const char* version,
85 const char* compiler,
86 const char* plateform,
87 const bool debug,
88 const bool SO_UNUSED_PARAM(is_secure_scl) );
89private:
90 SoModule() {};
91};
92
93#include <SoVersion.h>
94#include <SoResourcePreproc.i>
95#if defined(_DEBUG)
96#define IS_DEBUG 1
97#else
98#define IS_DEBUG 0
99#endif
100
101#if !defined(_SECURE_SCL) || (_SECURE_SCL==1)
102#define IS_SECURE_SCL 1
103#else
104#define IS_SECURE_SCL 0
105#endif
106
107#define SO_MODULE_HEADER( className, libName) \
108class className##Module : public SoModule \
109{ \
110 public: \
111 className##Module() \
112 : SoModule( libName, SO_PRODUCT_VERSION, COMPILER_STRING, SO_PRODUCT_STRING_PLATFORM, IS_DEBUG , IS_SECURE_SCL) {} \
113};
114
115#define SO_MODULE_SOURCE( className, productName ) \
116const 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; \
117className##Module g_##className##Module
118
119#else
120#define SO_MODULE_HEADER( className, libName)
121#define SO_MODULE_SOURCE( className, productName) ;
122
123#endif // LIBRARY_BUILD
124
125#endif // HIDDEN_FROM_DOC
126
127#endif // SO_MODULE
128
129
Class used to check and report library and application consistency.
Definition SoModule.h:41
static int getProductVersion()
Returns the Open Inventor version of the library.
static const char * getCompilerString()
Returns a string describing the compiler used to build the library.
static const char * getInternalBuildString()
Returns as a string the internal VSG build number.
static bool isSCLFlag()
Returns TRUE if the library was built with _SECURE_SCL=1 compiler flag.
static const char * getPlatformString()
Returns a string describing the platform used to build the library.
SoModuleCheck(const int so_version_deprecated_error)
Checks the application was not built with SO_VERSION_DEPRECATED_ERROR.
SoModuleCheck(const bool is_secure_scl)
Constructor.
static bool isDebug()
Returns TRUE if the library was built in debug mode.