Sha256: 5a6d62cdf9de6b5b5408ed8fb8ceea187d561a64a3edac24099f233766af85b8

Contents?: true

Size: 1.49 KB

Versions: 56

Compression:

Stored size: 1.49 KB

Contents

// (C) Copyright 2013,2015 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)


#ifndef BOOST_THREAD_CALL_CONTEXT_HPP
#define BOOST_THREAD_CALL_CONTEXT_HPP

#include <boost/thread/detail/config.hpp>
#if defined BOOST_THREAD_USES_LOG_THREAD_ID
#include <boost/thread/thread.hpp>
#endif
#include <boost/current_function.hpp>
#include <boost/io/ios_state.hpp>
#include <iomanip>

#include <boost/config/abi_prefix.hpp>

namespace boost
{

  struct caller_context_t
  {
    const char * filename;
    unsigned lineno;
    const char * func;
    caller_context_t(const char * filename, unsigned lineno, const char * func) :
      filename(filename), lineno(lineno), func(func)
    {
    }
  };

#define BOOST_CONTEXTOF boost::caller_context_t(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION)

  template <typename OStream>
  OStream& operator<<(OStream& os, caller_context_t const& ctx)
  {
#if defined BOOST_THREAD_USES_LOG_THREAD_ID
    {
      io::ios_flags_saver ifs( os );
      os << std::left << std::setw(14) << boost::this_thread::get_id() << " ";
    }
#endif
    {
      io::ios_flags_saver ifs(os);
      os << std::setw(50) << ctx.filename << "["
         << std::setw(4) << std::right << std::dec<< ctx.lineno << "] ";
#if defined BOOST_THREAD_USES_LOG_CURRENT_FUNCTION
      os << ctx.func << " " ;
#endif
    }
    return os;
  }
}

#include <boost/config/abi_suffix.hpp>

#endif // header

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
passenger-6.0.25 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.24 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp
passenger-6.0.4 src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp