Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

XSECDefs.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * imitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * XSECDefs := File for general XSEC definitions
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: XSECDefs.hpp,v 1.9 2004/02/08 10:24:23 blautenb Exp $
00025  *
00026  */
00027 
00028 // Use Xerces to do the "hard work in determining compilers etc." for us
00029 
00030 #ifndef XSECDEFS_HEADER
00031 #define XSECDEFS_HEADER
00032 
00033 // Include the generated include file
00034 
00035 #if defined (_WIN32)
00036 #   if defined (_DEBUG)
00037 #       include <afx.h>
00038 #       include <crtdbg.h>
00039 #   else
00040 #       define WIN32_LEAN_AND_MEAN
00041 #       include <windows.h>
00042 #   endif
00043 #   include <xsec/framework/XSECW32Config.hpp>
00044 #else
00045 #   include <xsec/framework/XSECConfig.hpp>
00046 #endif
00047 
00048 // General includes
00049 
00050 #include <assert.h>
00051 #include <stdlib.h>
00052 
00053 // Xalan
00054 
00055 //#include <Include/PlatformDefinitions.hpp>
00056 
00057 // Xerces
00058 
00059 #include <xercesc/util/XercesDefs.hpp>
00060 
00061 // --------------------------------------------------------------------------------
00062 //           Namespace Handling
00063 // --------------------------------------------------------------------------------
00064 
00065 // Use an approach similar to that used in Xalan to process Xerces namespaces
00066 
00067 #if defined(XERCES_HAS_CPP_NAMESPACE)
00068 #   define XSEC_USING_XERCES(NAME) using XERCES_CPP_NAMESPACE :: NAME
00069 #   define XSEC_DECLARE_XERCES_CLASS(NAME) namespace XERCES_CPP_NAMESPACE { class NAME; }
00070 #   define XSEC_DECLARE_XERCES_STRUCT(NAME) namespace XERCES_CPP_NAMESPACE { struct NAME; }
00071 #else
00072 #   define XERCES_CPP_NAMESPACE_QUALIFIER
00073 #   define XERCES_CPP_NAMESPACE_BEGIN
00074 #   define XERCES_CPP_NAMESPACE_END
00075 #   define XERCES_CPP_NAMESPACE_USE
00076 #   define XSEC_USING_XERCES(NAME)
00077 #   define XSEC_DECLARE_XERCES_CLASS(NAME) class NAME;
00078 #   define XSEC_DECLARE_XERCES_STRUCT(NAME) struct NAME;
00079 #endif
00080 
00081 
00082 // --------------------------------------------------------------------------------
00083 //           Project Library Handling
00084 // --------------------------------------------------------------------------------
00085 
00086 #if defined (PROJ_CANON)
00087 
00088 #define CANON_EXPORT PLATFORM_EXPORT
00089 #else
00090 #define CANON_EXPORT PLATFORM_IMPORT
00091 #endif
00092 
00093 #if defined (PROJ_DSIG)
00094 
00095 #define DSIG_EXPORT PLATFORM_EXPORT
00096 #else
00097 #define DSIG_EXPORT PLATFORM_IMPORT
00098 #endif
00099 
00100 // Platform includes.  Much of this is taken from Xalan
00101 
00102 #if defined(_MSC_VER)
00103 
00104 // Microsoft VC++
00105 
00106 #   pragma warning(disable: 4127 4251 4511 4512 4514 4702 4710 4711 4786 4097; error: 4150 4172 4238 4239 4715)
00107 #   define XSEC_NO_COVARIANT_RETURN_TYPE
00108 /*
00109  * Removed to allow any compiler to compile - might not work, but ....
00110  * #elif defined(__GNUC__)
00111  * #elif defined(__INTEL_COMPILER)
00112  * #else
00113  * #error Unknown compiler.
00114  */
00115 #endif
00116 
00117 
00118 // Configuration includes
00119 
00120 // We want to use XPath calculated transforms
00121 
00122 //#define XSEC_USE_XPATH_ENVELOPE
00123 
00124 
00125 // Given the configuration - what should we set?
00126 
00127 #ifdef XSEC_NO_XALAN
00128 
00129 // Xalan is not available!
00130 
00131 #   define XSEC_NO_XPATH
00132 #   define XSEC_NO_XSLT
00133 
00134 #endif  /* XSEC_NO_XALAN */
00135 
00136 #ifdef XSEC_NO_XPATH
00137 
00138 #   ifdef XSEC_USE_XPATH_ENVELOPE
00139 #       undef XSEC_USE_XPATH_ENVELOPE
00140 #   endif
00141 
00142 #endif
00143 
00144 #endif /* XSECDEFS_HEADER */

Generated on Sun Mar 14 20:20:38 2004 for XML-Security-C by doxygen 1.3.2