NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
websocketpp::log::basic< concurrency, names > Class Template Reference

Basic logger that outputs to an ostream. More...

#include <basic.hpp>

Inheritance diagram for websocketpp::log::basic< concurrency, names >:

Public Member Functions

 basic (channel_type_hint::value h=channel_type_hint::access)
 
 basic (std::ostream *out)
 
 basic (level c, channel_type_hint::value h=channel_type_hint::access)
 
 basic (level c, std::ostream *out)
 
 ~basic ()
 Destructor. More...
 
 basic (basic< concurrency, names > const &other)
 Copy constructor. More...
 
void set_ostream (std::ostream *out=&std::cout)
 
void set_channels (level channels)
 
void clear_channels (level channels)
 
void write (level channel, std::string const &msg)
 Write a string message to the given channel. More...
 
void write (level channel, char const *msg)
 Write a cstring message to the given channel. More...
 
_WEBSOCKETPP_CONSTEXPR_TOKEN_ bool static_test (level channel) const
 
bool dynamic_test (level channel)
 

Protected Types

typedef concurrency::scoped_lock_type scoped_lock_type
 
typedef concurrency::mutex_type mutex_type
 

Protected Attributes

mutex_type m_lock
 

Detailed Description

template<typename concurrency, typename names>
class websocketpp::log::basic< concurrency, names >

Basic logger that outputs to an ostream.

Definition at line 59 of file basic.hpp.

Member Typedef Documentation

◆ scoped_lock_type

template<typename concurrency, typename names>
typedef concurrency::scoped_lock_type websocketpp::log::basic< concurrency, names >::scoped_lock_type
protected

Definition at line 169 of file basic.hpp.

◆ mutex_type

template<typename concurrency, typename names>
typedef concurrency::mutex_type websocketpp::log::basic< concurrency, names >::mutex_type
protected

Definition at line 170 of file basic.hpp.

Constructor & Destructor Documentation

◆ basic() [1/5]

template<typename concurrency, typename names>
websocketpp::log::basic< concurrency, names >::basic ( channel_type_hint::value  h = channel_type_hint::access)
inline

Definition at line 61 of file basic.hpp.

◆ basic() [2/5]

template<typename concurrency, typename names>
websocketpp::log::basic< concurrency, names >::basic ( std::ostream *  out)
inline

Definition at line 67 of file basic.hpp.

◆ basic() [3/5]

template<typename concurrency, typename names>
websocketpp::log::basic< concurrency, names >::basic ( level  c,
channel_type_hint::value  h = channel_type_hint::access 
)
inline

Definition at line 72 of file basic.hpp.

◆ basic() [4/5]

template<typename concurrency, typename names>
websocketpp::log::basic< concurrency, names >::basic ( level  c,
std::ostream *  out 
)
inline

Definition at line 78 of file basic.hpp.

◆ ~basic()

template<typename concurrency, typename names>
websocketpp::log::basic< concurrency, names >::~basic ( )
inline

Destructor.

Definition at line 84 of file basic.hpp.

◆ basic() [5/5]

template<typename concurrency, typename names>
websocketpp::log::basic< concurrency, names >::basic ( basic< concurrency, names > const &  other)
inline

Copy constructor.

Definition at line 87 of file basic.hpp.

Member Function Documentation

◆ set_ostream()

template<typename concurrency, typename names>
void websocketpp::log::basic< concurrency, names >::set_ostream ( std::ostream *  out = &std::cout)
inline

Definition at line 113 of file basic.hpp.

◆ set_channels()

template<typename concurrency, typename names>
void websocketpp::log::basic< concurrency, names >::set_channels ( level  channels)
inline

◆ clear_channels()

template<typename concurrency, typename names>
void websocketpp::log::basic< concurrency, names >::clear_channels ( level  channels)
inline

◆ write() [1/2]

template<typename concurrency, typename names>
void websocketpp::log::basic< concurrency, names >::write ( level  channel,
std::string const &  msg 
)
inline

Write a string message to the given channel.

Parameters
channelThe channel to write to
msgThe message to write

Definition at line 137 of file basic.hpp.

References websocketpp::log::basic< concurrency, names >::dynamic_test(), and websocketpp::log::basic< concurrency, names >::m_lock.

Referenced by BOOST_AUTO_TEST_CASE().

◆ write() [2/2]

template<typename concurrency, typename names>
void websocketpp::log::basic< concurrency, names >::write ( level  channel,
char const *  msg 
)
inline

Write a cstring message to the given channel.

Parameters
channelThe channel to write to
msgThe message to write

Definition at line 151 of file basic.hpp.

References websocketpp::log::basic< concurrency, names >::dynamic_test(), and websocketpp::log::basic< concurrency, names >::m_lock.

◆ static_test()

template<typename concurrency, typename names>
_WEBSOCKETPP_CONSTEXPR_TOKEN_ bool websocketpp::log::basic< concurrency, names >::static_test ( level  channel) const
inline

Definition at line 160 of file basic.hpp.

◆ dynamic_test()

template<typename concurrency, typename names>
bool websocketpp::log::basic< concurrency, names >::dynamic_test ( level  channel)
inline

Member Data Documentation

◆ m_lock


The documentation for this class was generated from the following file: