summaryrefslogtreecommitdiff
path: root/boost/test/utils/runtime/env/environment.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/test/utils/runtime/env/environment.ipp')
-rw-r--r--boost/test/utils/runtime/env/environment.ipp52
1 files changed, 26 insertions, 26 deletions
diff --git a/boost/test/utils/runtime/env/environment.ipp b/boost/test/utils/runtime/env/environment.ipp
index 5a320003f7..6baf72f430 100644
--- a/boost/test/utils/runtime/env/environment.ipp
+++ b/boost/test/utils/runtime/env/environment.ipp
@@ -1,6 +1,6 @@
-// (C) Copyright Gennadiy Rozental 2005-2008.
+// (C) Copyright Gennadiy Rozental 2005-2014.
// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
+// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
@@ -9,11 +9,11 @@
//
// Version : $Revision$
//
-// Description : implements model of program environment
+// Description : implements model of program environment
// ***************************************************************************
-#ifndef BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
-#define BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
+#ifndef BOOST_TEST_UTILS_RUNTIME_ENV_ENVIRONMENT_IPP
+#define BOOST_TEST_UTILS_RUNTIME_ENV_ENVIRONMENT_IPP
// Boost.Runtime.Parameter
#include <boost/test/utils/runtime/config.hpp>
@@ -31,7 +31,7 @@
namespace boost {
-namespace BOOST_RT_PARAM_NAMESPACE {
+namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE {
namespace environment {
@@ -44,10 +44,10 @@ namespace rt_env_detail {
typedef std::map<cstring,rt_env_detail::variable_data> registry;
typedef std::list<dstring> keys;
-BOOST_RT_PARAM_INLINE registry& s_registry() { static registry instance; return instance; }
-BOOST_RT_PARAM_INLINE keys& s_keys() { static keys instance; return instance; }
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE registry& s_registry() { static registry instance; return instance; }
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE keys& s_keys() { static keys instance; return instance; }
-BOOST_RT_PARAM_INLINE variable_data&
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE variable_data&
new_var_record( cstring var_name )
{
// save the name in list of keys
@@ -57,15 +57,15 @@ new_var_record( cstring var_name )
// create and return new record
variable_data& new_var_data = s_registry()[key];
-
+
new_var_data.m_var_name = key;
-
+
return new_var_data;
}
//____________________________________________________________________________//
-BOOST_RT_PARAM_INLINE variable_data*
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE variable_data*
find_var_record( cstring var_name )
{
registry::iterator it = s_registry().find( var_name );
@@ -75,41 +75,41 @@ find_var_record( cstring var_name )
//____________________________________________________________________________//
-#ifdef BOOST_MSVC
-#pragma warning(push)
+#ifdef BOOST_MSVC
+#pragma warning(push)
#pragma warning(disable:4996) // getenv
#endif
-BOOST_RT_PARAM_INLINE cstring
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE cstring
sys_read_var( cstring var_name )
{
using namespace std;
- return BOOST_RT_PARAM_GETENV( var_name.begin() );
+ return BOOST_TEST_UTILS_RUNTIME_PARAM_GETENV( var_name.begin() );
}
-#ifdef BOOST_MSVC
-#pragma warning(pop)
+#ifdef BOOST_MSVC
+#pragma warning(pop)
#endif
//____________________________________________________________________________//
-BOOST_RT_PARAM_INLINE void
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE void
sys_write_var( cstring var_name, format_stream& var_value )
{
- BOOST_RT_PARAM_PUTENV( var_name, cstring( var_value.str() ) );
+ BOOST_TEST_UTILS_RUNTIME_PARAM_PUTENV( var_name, cstring( var_value.str() ) );
}
//____________________________________________________________________________//
} // namespace rt_env_detail
-BOOST_RT_PARAM_INLINE variable_base
+BOOST_TEST_UTILS_RUNTIME_PARAM_INLINE variable_base
var( cstring var_name )
{
rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
- BOOST_RT_PARAM_VALIDATE_LOGIC( !!vd,
- BOOST_RT_PARAM_LITERAL( "First access to the environment variable " )
- << var_name << BOOST_RT_PARAM_LITERAL( " should be typed" ) );
+ BOOST_TEST_UTILS_RUNTIME_PARAM_VALIDATE_LOGIC( !!vd,
+ BOOST_TEST_UTILS_RUNTIME_PARAM_LITERAL( "First access to the environment variable " )
+ << var_name << BOOST_TEST_UTILS_RUNTIME_PARAM_LITERAL( " should be typed" ) );
return variable_base( *vd );
}
@@ -118,8 +118,8 @@ var( cstring var_name )
} // namespace environment
-} // namespace BOOST_RT_PARAM_NAMESPACE
+} // namespace BOOST_TEST_UTILS_RUNTIME_PARAM_NAMESPACE
} // namespace boost
-#endif // BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
+#endif // BOOST_TEST_UTILS_RUNTIME_ENV_ENVIRONMENT_IPP_062904GER