Realistic 3D camera system
3D camera system components
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
services::logger_service Class Reference

Service implementation for the logger. More...

#include <logger_service.hpp>

Inheritance diagram for services::logger_service:
asio::io_service::service asio::detail::noncopyable

Classes

struct  logger_impl
 The backend implementation of a logger. More...
 

Public Types

typedef logger_implimpl_type
 The type for an implementation of the logger. More...
 

Public Member Functions

 logger_service (asio::io_service &io_service)
 Constructor creates a thread to run a private io_service. More...
 
 ~logger_service ()
 Destructor shuts down the private io_service. More...
 
void shutdown_service ()
 Destroy all user-defined handler objects owned by the service. More...
 
impl_type null () const
 Return a null logger implementation. More...
 
void create (impl_type &impl, const std::string &identifier)
 Create a new logger implementation. More...
 
void destroy (impl_type &impl)
 Destroy a logger implementation. More...
 
void use_file (impl_type &, const std::string &file)
 
void log (impl_type &impl, const std::string &message)
 Log a message. More...
 
- Public Member Functions inherited from asio::io_service::service
asio::io_serviceget_io_service ()
 Get the io_service object that owns the service. More...
 

Static Public Attributes

static asio::io_service::id id
 The unique service identifier. More...
 

Additional Inherited Members

- Protected Member Functions inherited from asio::io_service::service
ASIO_DECL service (asio::io_service &owner)
 Constructor. More...
 
virtual ASIO_DECL ~service ()
 Destructor. More...
 

Detailed Description

Service implementation for the logger.

Definition at line 26 of file logger_service.hpp.

Member Typedef Documentation

The type for an implementation of the logger.

Definition at line 41 of file logger_service.hpp.

Constructor & Destructor Documentation

services::logger_service::logger_service ( asio::io_service io_service)
inline

Constructor creates a thread to run a private io_service.

Definition at line 44 of file logger_service.hpp.

services::logger_service::~logger_service ( )
inline

Destructor shuts down the private io_service.

Indicate that we have finished with the private io_service. Its io_service::run() function will exit once all other work has completed.

Definition at line 54 of file logger_service.hpp.

Member Function Documentation

void services::logger_service::create ( impl_type impl,
const std::string &  identifier 
)
inline

Create a new logger implementation.

Definition at line 75 of file logger_service.hpp.

void services::logger_service::destroy ( impl_type impl)
inline

Destroy a logger implementation.

Definition at line 81 of file logger_service.hpp.

void services::logger_service::log ( impl_type impl,
const std::string &  message 
)
inline

Log a message.

Definition at line 99 of file logger_service.hpp.

impl_type services::logger_service::null ( ) const
inline

Return a null logger implementation.

Definition at line 69 of file logger_service.hpp.

void services::logger_service::shutdown_service ( )
inlinevirtual

Destroy all user-defined handler objects owned by the service.

Implements asio::io_service::service.

Definition at line 64 of file logger_service.hpp.

void services::logger_service::use_file ( impl_type ,
const std::string &  file 
)
inline

Set the output file for the logger. The current implementation sets the output file for all logger instances, and so the impl parameter is not actually needed. It is retained here to illustrate how service functions are typically defined.

Definition at line 91 of file logger_service.hpp.

Member Data Documentation

asio::io_service::id services::logger_service::id
static

The unique service identifier.

Definition at line 31 of file logger_service.hpp.


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