w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <RlogFile.hpp>
Public Member Functions | |
RlogFile () | |
Default constructor. | |
RlogFile (std::ostream *os, const std::string &name="") | |
FIXME_docs. | |
~RlogFile () | |
Destructor. | |
RlogFile (const RlogFile &)=delete | |
RlogFile & | operator= (const RlogFile &)=delete |
bool | IsNew () const |
FIXME_docs. | |
bool | Open (std::string name, RerrMsg &emsg) |
FIXME_docs. | |
void | Close () |
FIXME_docs. | |
void | UseStream (std::ostream *os, const std::string &name="") |
FIXME_docs. | |
const std::string & | Name () const |
FIXME_docs. | |
void | Write (const std::string &str, char tag=0) |
FIXME_docs. | |
void | Dump (std::ostream &os, int ind=0, const char *text=0) const |
FIXME_docs. | |
void | lock () |
FIXME_docs. | |
void | unlock () |
FIXME_docs. | |
RlogFile & | operator<< (const RlogMsg &lmsg) |
FIXME_docs. | |
Protected Member Functions | |
std::ostream & | Stream () |
FIXME_docs. | |
void | ClearTime () |
FIXME_docs. | |
std::string | BuildinStreamName (std::ostream *os, const std::string &str) |
FIXME_docs. | |
Protected Attributes | |
std::ostream * | fpExtStream |
pointer to external stream | |
std::ofstream | fIntStream |
internal stream | |
bool | fNew |
true if never opened or used | |
std::string | fName |
log file name | |
int | fTagYear |
year of last time tag | |
int | fTagMonth |
month of last time tag | |
int | fTagDay |
day of last time tag | |
std::mutex | fMutex |
mutex to lock file | |
FIXME_docs.
Definition at line 34 of file RlogFile.hpp.
Retro::RlogFile::RlogFile | ( | ) |
|
explicit |
Retro::RlogFile::~RlogFile | ( | ) |
Destructor.
Definition at line 73 of file RlogFile.cpp.
|
delete |
|
inline |
bool Retro::RlogFile::Open | ( | std::string | name, |
RerrMsg & | emsg | ||
) |
FIXME_docs.
Definition at line 79 of file RlogFile.cpp.
References fIntStream, fName, fNew, fpExtStream, Retro::RerrMsg::InitErrno(), and UseStream().
void Retro::RlogFile::Close | ( | ) |
FIXME_docs.
Definition at line 104 of file RlogFile.cpp.
References fIntStream.
Referenced by UseStream().
void Retro::RlogFile::UseStream | ( | std::ostream * | os, |
const std::string & | name = "" |
||
) |
FIXME_docs.
Definition at line 113 of file RlogFile.cpp.
References BuildinStreamName(), Close(), fIntStream, fName, fNew, and fpExtStream.
Referenced by Open().
|
inline |
FIXME_docs.
Definition at line 30 of file RlogFile.ipp.
References fName.
Referenced by Retro::RlinkConnect::LogFileName(), and Retro::RtclRlinkConnect::M_default().
void Retro::RlogFile::Write | ( | const std::string & | str, |
char | tag = 0 |
||
) |
FIXME_docs.
Definition at line 125 of file RlogFile.cpp.
References fIntStream, fpExtStream, fTagDay, fTagMonth, fTagYear, lock(), and Retro::RosPrintf().
Referenced by Retro::RtclRlinkConnect::M_log(), and operator<<().
void Retro::RlogFile::Dump | ( | std::ostream & | os, |
int | ind = 0 , |
||
const char * | text = 0 |
||
) | const |
FIXME_docs.
Definition at line 168 of file RlogFile.cpp.
References fIntStream, fName, fNew, fpExtStream, fTagDay, fTagMonth, fTagYear, and Retro::RosPrintf().
void Retro::RlogFile::lock | ( | ) |
void Retro::RlogFile::unlock | ( | ) |
FIXME_docs.
Definition at line 202 of file RlogFile.cpp.
References Retro::RlogMsg::String(), Retro::RlogMsg::Tag(), and Write().
|
inlineprotected |
|
protected |
FIXME_docs.
Definition at line 212 of file RlogFile.cpp.
References fTagDay, fTagMonth, and fTagYear.
Referenced by RlogFile().
|
protected |
|
protected |
pointer to external stream
Definition at line 65 of file RlogFile.hpp.
Referenced by Dump(), Open(), Stream(), UseStream(), and Write().
|
protected |
internal stream
Definition at line 66 of file RlogFile.hpp.
Referenced by Close(), Dump(), Open(), Stream(), UseStream(), and Write().
|
protected |
true if never opened or used
Definition at line 67 of file RlogFile.hpp.
Referenced by Dump(), IsNew(), Open(), and UseStream().
|
protected |
log file name
Definition at line 68 of file RlogFile.hpp.
Referenced by Dump(), Name(), Open(), and UseStream().
|
protected |
year of last time tag
Definition at line 69 of file RlogFile.hpp.
Referenced by ClearTime(), Dump(), and Write().
|
protected |
month of last time tag
Definition at line 70 of file RlogFile.hpp.
Referenced by ClearTime(), Dump(), and Write().
|
protected |
day of last time tag
Definition at line 71 of file RlogFile.hpp.
Referenced by ClearTime(), Dump(), and Write().
|
protected |