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

XSECDefs.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 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  * limitations 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.13 2005/02/26 10:12:31 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 // General includes
00034 
00035 #include <assert.h>
00036 #include <stdlib.h>
00037 
00038 // Include the generated include file
00039 
00040 #if defined (_WIN32)
00041 #   include <xsec/framework/XSECW32Config.hpp>
00042 #   if defined (_DEBUG) && defined (_XSEC_DO_MEMDEBUG)
00043 #       define _CRTDBG_MAP_ALLOC
00044 #       include <crtdbg.h>
00045 #   endif
00046 #   define WIN32_LEAN_AND_MEAN
00047 #   include <windows.h>
00048 #else
00049 #   include <xsec/framework/XSECConfig.hpp>
00050 #endif
00051 
00052 // Xalan
00053 
00054 //#include <Include/PlatformDefinitions.hpp>
00055 
00056 // Xerces
00057 
00058 #include <xercesc/util/XercesDefs.hpp>
00059 
00060 // --------------------------------------------------------------------------------
00061 //           Namespace Handling
00062 // --------------------------------------------------------------------------------
00063 
00064 // Use an approach similar to that used in Xalan to process Xerces namespaces
00065 
00066 #if defined(XERCES_HAS_CPP_NAMESPACE)
00067 #   define XSEC_USING_XERCES(NAME) using XERCES_CPP_NAMESPACE :: NAME
00068 #   define XSEC_DECLARE_XERCES_CLASS(NAME) namespace XERCES_CPP_NAMESPACE { class NAME; }
00069 #   define XSEC_DECLARE_XERCES_STRUCT(NAME) namespace XERCES_CPP_NAMESPACE { struct NAME; }
00070 #else
00071 #   define XERCES_CPP_NAMESPACE_QUALIFIER
00072 #   define XERCES_CPP_NAMESPACE_BEGIN
00073 #   define XERCES_CPP_NAMESPACE_END
00074 #   define XERCES_CPP_NAMESPACE_USE
00075 #   define XSEC_USING_XERCES(NAME)
00076 #   define XSEC_DECLARE_XERCES_CLASS(NAME) class NAME;
00077 #   define XSEC_DECLARE_XERCES_STRUCT(NAME) struct NAME;
00078 #endif
00079 
00080 #if defined (XSEC_XERCES_XMLSTRING_HAS_RELEASE)
00081 #    define XSEC_RELEASE_XMLCH(x) XMLString::release(&x)
00082 #else
00083 #    define XSEC_RELEASE_XMLCH(x) delete[] x;
00084 #endif
00085 
00086 // --------------------------------------------------------------------------------
00087 //           Project Library Handling
00088 // --------------------------------------------------------------------------------
00089 
00090 #if defined (PROJ_CANON)
00091 
00092 #define CANON_EXPORT PLATFORM_EXPORT
00093 #else
00094 #define CANON_EXPORT PLATFORM_IMPORT
00095 #endif
00096 
00097 #if defined (PROJ_DSIG)
00098 
00099 #define DSIG_EXPORT PLATFORM_EXPORT
00100 #else
00101 #define DSIG_EXPORT PLATFORM_IMPORT
00102 #endif
00103 
00104 // Platform includes.  Much of this is taken from Xalan
00105 
00106 #if defined(_MSC_VER)
00107 
00108 // Microsoft VC++
00109 
00110 #   pragma warning(disable: 4127 4251 4511 4503 4512 4514 4702 4710 4711 4786 4097; error: 4150 4172 4238 4239 4715)
00111 #   define XSEC_NO_COVARIANT_RETURN_TYPE
00112 /*
00113  * Removed to allow any compiler to compile - might not work, but ....
00114  * #elif defined(__GNUC__)
00115  * #elif defined(__INTEL_COMPILER)
00116  * #else
00117  * #error Unknown compiler.
00118  */
00119 #endif
00120 
00121 
00122 // Configuration includes
00123 
00124 // We want to use XPath calculated transforms
00125 
00126 //#define XSEC_USE_XPATH_ENVELOPE
00127 
00128 
00129 // Given the configuration - what should we set?
00130 
00131 #ifdef XSEC_NO_XALAN
00132 
00133 // Xalan is not available!
00134 
00135 #   define XSEC_NO_XPATH
00136 #   define XSEC_NO_XSLT
00137 
00138 #endif  /* XSEC_NO_XALAN */
00139 
00140 #ifdef XSEC_NO_XPATH
00141 
00142 #   ifdef XSEC_USE_XPATH_ENVELOPE
00143 #       undef XSEC_USE_XPATH_ENVELOPE
00144 #   endif
00145 
00146 #endif
00147 
00148 #endif /* XSECDEFS_HEADER */

Generated on Sun Jul 3 17:37:28 2005 for XML-Security-C by  doxygen 1.4.2