Added file needed by utility/build/Jamfile.v2

[SVN r2631]
This commit is contained in:
Larry Joe Evans
2005-06-14 13:41:43 +00:00
parent c346d99b84
commit 85a6825e74

View File

@@ -0,0 +1,46 @@
#ifndef UTILITY_TRACE_SCOPE_STK_HPP
#define UTILITY_TRACE_SCOPE_STK_HPP
#include <vector>
#include "boost/utility/trace_scope.hpp"
namespace utility
{
struct trace_scope_stk
: public trace_scope
//Purpose:
// Simply keeps a stack variables of
// type trace_scope_stk
{
public:
static
std::string const&
top_name(void)
{ return c_scope_names.back()
;}
static
std::string const
top_result(bool result_bool)
{ std::string result_string(c_scope_names.back())
; result_string += std::string(":result=")
; result_string += c_test_results[result_bool]
; return result_string
;}
trace_scope_stk(std::string const& a_name)
: trace_scope(a_name)
{ c_scope_names.push_back(a_name)
;}
~trace_scope_stk(void)
{ c_scope_names.pop_back()
;}
private:
static
std::vector<std::string>
c_scope_names
;
static
std::string const
c_test_results[2]
;
};
}//exit utility namespace
#endif