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 1.6 2006/04/19 09:11:38 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 TAO_VERSIONED_NAMESPACE_H
00018 #define TAO_VERSIONED_NAMESPACE_H
00019 
00020 #if !defined (TAO_ORBCONF_H) && !defined (ACE_CONFIG_MACROS_H)
00021 # error This header is only meant to be included after "tao/orbconf.h".
00022 #endif  /* !TAO_ORBCONF_H */
00023 
00024 
00025 #if !defined (TAO_HAS_VERSIONED_NAMESPACE) \
00026   && defined (ACE_HAS_VERSIONED_NAMESPACE) \
00027   && ACE_HAS_VERSIONED_NAMESPACE == 1
00028 # define TAO_HAS_VERSIONED_NAMESPACE 1
00029 #endif  /* !TAO_HAS_VERSIONED_NAMESPACE
00030            && ACE_HAS_VERSIONED_NAMESPACE == 1*/
00031 
00032 #if defined (TAO_HAS_VERSIONED_NAMESPACE) && TAO_HAS_VERSIONED_NAMESPACE == 1
00033 
00034 # ifndef TAO_VERSIONED_NAMESPACE_NAME
00035 #  include "tao/Version.h"
00036 
00037 // Preprocessor symbols will not be expanded if they are
00038 // concatenated.  Force the preprocessor to expand them during the
00039 // argument prescan by calling a macro that itself calls another that
00040 // performs the actual concatenation.
00041 #  define TAO_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA) TAO_ ## MAJOR ## _ ## MINOR ## _ ## BETA
00042 #  define TAO_MAKE_VERSIONED_NAMESPACE_NAME(MAJOR,MINOR,BETA) TAO_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA)
00043 #  define TAO_VERSIONED_NAMESPACE_NAME TAO_MAKE_VERSIONED_NAMESPACE_NAME(TAO_MAJOR_VERSION,TAO_MINOR_VERSION,TAO_BETA_VERSION)
00044 # endif  /* !TAO_VERSIONED_NAMESPACE_NAME */
00045 
00046 # define TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO_VERSIONED_NAMESPACE_NAME {
00047 # define TAO_END_VERSIONED_NAMESPACE_DECL } \
00048   using namespace TAO_VERSIONED_NAMESPACE_NAME;
00049 
00050 #else
00051 
00052 # define TAO_VERSIONED_NAMESPACE_NAME
00053 # define TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00054 # define TAO_END_VERSIONED_NAMESPACE_DECL
00055 
00056 #endif  /* TAO_HAS_VERSIONED_NAMESPACE */
00057 
00058 #endif  /* !TAO_VERSIONED_NAMESPACE_H */

Generated on Thu Nov 9 11:54:28 2006 for TAO by doxygen 1.3.6