Document return values
[ACE_TAO.git] / ACE / ace / Versioned_Namespace.h
blobcd1e68ba752995594f396d524676b257002b7fd1
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Versioned_Namespace.h
7 * Versioned namespace support.
9 * Useful for preventing conflicts when using a third party library.
11 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
13 //=============================================================================
15 #ifndef ACE_VERSIONED_NAMESPACE_H
16 #define ACE_VERSIONED_NAMESPACE_H
18 #ifndef ACE_CONFIG_MACROS_H
19 # error This header is only meant to be included by or after "ace/config-lite.h".
20 #endif /* !ACE_CONFIG_LITE_H */
23 #if defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1
25 # ifndef ACE_VERSIONED_NAMESPACE_NAME
26 //# include "ace/Version.h"
28 // Preprocessor symbols will not be expanded if they are
29 // concatenated. Force the preprocessor to expand them during the
30 // argument prescan by calling a macro that itself calls another that
31 // performs the actual concatenation.
32 # define ACE_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,MICRO) ACE_ ## MAJOR ## _ ## MINOR ## _ ## MICRO
33 # define ACE_MAKE_VERSIONED_NAMESPACE_NAME(MAJOR,MINOR,MICRO) ACE_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,MICRO)
34 # define ACE_VERSIONED_NAMESPACE_NAME ACE_MAKE_VERSIONED_NAMESPACE_NAME(ACE_MAJOR_VERSION,ACE_MINOR_VERSION,ACE_MICRO_VERSION)
35 # endif /* !ACE_VERSIONED_NAMESPACE_NAME */
37 # define ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE_VERSIONED_NAMESPACE_NAME {
38 # define ACE_END_VERSIONED_NAMESPACE_DECL } \
39 using namespace ACE_VERSIONED_NAMESPACE_NAME;
41 #else
43 # define ACE_VERSIONED_NAMESPACE_NAME
44 # define ACE_BEGIN_VERSIONED_NAMESPACE_DECL
45 # define ACE_END_VERSIONED_NAMESPACE_DECL
47 #endif /* ACE_HAS_VERSIONED_NAMESPACE */
49 #endif /* !ACE_VERSIONED_NAMESPACE_H */