Versioned_Namespace.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file    Versioned_Namespace.h
00006  *
00007  * Versioned_Namespace.h,v 4.6 2006/04/19 08:09:35 jwillemsen Exp
00008  *
00009  * Versioned namespace support.
00010  *
00011  * Useful for preventing conflicts when using a third party library.
00012  *
00013  * @author Ossama Othman <ossama@dre.vanderbilt.edu>
00014  */
00015 //=============================================================================
00016 
00017 #ifndef ACE_VERSIONED_NAMESPACE_H
00018 #define ACE_VERSIONED_NAMESPACE_H
00019 
00020 #ifndef ACE_CONFIG_MACROS_H
00021 # error This header is only meant to be included by or after "ace/config-lite.h".
00022 #endif  /* !ACE_CONFIG_LITE_H */
00023 
00024 
00025 #if defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1
00026 
00027 # ifndef ACE_VERSIONED_NAMESPACE_NAME
00028 //#  include "ace/Version.h"
00029 
00030 // Preprocessor symbols will not be expanded if they are
00031 // concatenated.  Force the preprocessor to expand them during the
00032 // argument prescan by calling a macro that itself calls another that
00033 // performs the actual concatenation.
00034 #  define ACE_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA) ACE_ ## MAJOR ## _ ## MINOR ## _ ## BETA
00035 #  define ACE_MAKE_VERSIONED_NAMESPACE_NAME(MAJOR,MINOR,BETA) ACE_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA)
00036 #  define ACE_VERSIONED_NAMESPACE_NAME ACE_MAKE_VERSIONED_NAMESPACE_NAME(ACE_MAJOR_VERSION,ACE_MINOR_VERSION,ACE_BETA_VERSION)
00037 # endif  /* !ACE_VERSIONED_NAMESPACE_NAME */
00038 
00039 # define ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE_VERSIONED_NAMESPACE_NAME {
00040 # define ACE_END_VERSIONED_NAMESPACE_DECL } \
00041   using namespace ACE_VERSIONED_NAMESPACE_NAME;
00042 
00043 #else
00044 
00045 # define ACE_VERSIONED_NAMESPACE_NAME
00046 # define ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00047 # define ACE_END_VERSIONED_NAMESPACE_DECL
00048 
00049 #endif  /* ACE_HAS_VERSIONED_NAMESPACE */
00050 
00051 #endif  /* !ACE_VERSIONED_NAMESPACE_H */

Generated on Thu Nov 9 09:42:09 2006 for ACE by doxygen 1.3.6