OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::Log::Context Struct Reference

Scoped RAII for the global_log pointer. More...

#include <logdatetime.hpp>

Classes

class  Wrapper
 Argument to construct a Context in a different thread. More...
 

Public Member Functions

 Context (const Wrapper &)
 
 Context (const Wrapper &wrap)
 construct a Context in a different thread
 
 Context (OPENVPN_LOG_CLASS *cli)
 construct a Context setting the global_log pointer
 
 ~Context ()
 

Static Public Member Functions

static bool defined ()
 
static OPENVPN_LOG_CLASSobj ()
 

Detailed Description

Scoped RAII for the global_log pointer.

While in scope, global_log points to the instance of the class defined by the OPENVPN_LOG_CLASS macro above. When it goes out of scope, the global_log pointer is reset to nullptr

Definition at line 32 of file logdatetime.hpp.

Constructor & Destructor Documentation

◆ Context() [1/3]

openvpn::Log::Context::Context ( const Wrapper )
inline

Definition at line 37 of file logdatetime.hpp.

◆ Context() [2/3]

openvpn::Log::Context::Context ( const Wrapper wrap)
inline

construct a Context in a different thread

Parameters
wrapholds the value of global_log from the sourcing thread

Definition at line 65 of file logthread_class.hpp.

◆ Context() [3/3]

openvpn::Log::Context::Context ( OPENVPN_LOG_CLASS cli)
inline

construct a Context setting the global_log pointer

Parameters
clipointer to OPENVPN_LOG_CLASS instance

Definition at line 77 of file logthread_class.hpp.

◆ ~Context()

openvpn::Log::Context::~Context ( )
inline

Definition at line 82 of file logthread_class.hpp.

Member Function Documentation

◆ defined()

static bool openvpn::Log::Context::defined ( )
inlinestatic

Definition at line 87 of file logthread_class.hpp.

◆ obj()

static OPENVPN_LOG_CLASS * openvpn::Log::Context::obj ( )
inlinestatic

Definition at line 92 of file logthread_class.hpp.


The documentation for this struct was generated from the following files: