Photon 1.0.0
Loading...
Searching...
No Matches
spdlog::details::file_helper Class Reference

#include <file_helper.h>

Public Member Functions

 file_helper ()=default
 
 file_helper (const file_event_handlers &event_handlers)
 
 file_helper (const file_helper &)=delete
 
file_helperoperator= (const file_helper &)=delete
 
 ~file_helper ()
 
void open (const filename_t &fname, bool truncate=false)
 
void reopen (bool truncate)
 
void flush ()
 
void sync ()
 
void close ()
 
void write (const memory_buf_t &buf)
 
size_t size () const
 
const filename_tfilename () const
 

Static Public Member Functions

static std::tuple< filename_t, filename_tsplit_by_extension (const filename_t &fname)
 

Private Attributes

const int open_tries_ = 5
 
const unsigned int open_interval_ = 10
 
std::FILE * fd_ {nullptr}
 
filename_t filename_
 
file_event_handlers event_handlers_
 

Constructor & Destructor Documentation

◆ file_helper() [1/3]

spdlog::details::file_helper::file_helper ( )
default

◆ file_helper() [2/3]

SPDLOG_INLINE spdlog::details::file_helper::file_helper ( const file_event_handlers event_handlers)
explicit

◆ file_helper() [3/3]

spdlog::details::file_helper::file_helper ( const file_helper )
delete

◆ ~file_helper()

SPDLOG_INLINE spdlog::details::file_helper::~file_helper ( )

Member Function Documentation

◆ close()

SPDLOG_INLINE void spdlog::details::file_helper::close ( )

◆ filename()

SPDLOG_INLINE const filename_t & spdlog::details::file_helper::filename ( ) const

◆ flush()

SPDLOG_INLINE void spdlog::details::file_helper::flush ( )

◆ open()

SPDLOG_INLINE void spdlog::details::file_helper::open ( const filename_t fname,
bool  truncate = false 
)

◆ operator=()

file_helper & spdlog::details::file_helper::operator= ( const file_helper )
delete

◆ reopen()

SPDLOG_INLINE void spdlog::details::file_helper::reopen ( bool  truncate)

◆ size()

SPDLOG_INLINE size_t spdlog::details::file_helper::size ( ) const

◆ split_by_extension()

SPDLOG_INLINE std::tuple< filename_t, filename_t > spdlog::details::file_helper::split_by_extension ( const filename_t fname)
static

◆ sync()

SPDLOG_INLINE void spdlog::details::file_helper::sync ( )

◆ write()

SPDLOG_INLINE void spdlog::details::file_helper::write ( const memory_buf_t buf)

Member Data Documentation

◆ event_handlers_

file_event_handlers spdlog::details::file_helper::event_handlers_
private

◆ fd_

std::FILE* spdlog::details::file_helper::fd_ {nullptr}
private

◆ filename_

filename_t spdlog::details::file_helper::filename_
private

◆ open_interval_

const unsigned int spdlog::details::file_helper::open_interval_ = 10
private

◆ open_tries_

const int spdlog::details::file_helper::open_tries_ = 5
private

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