appkit  1.5.1
RoadNarrows Robotics Application Kit
rnr::LogBook::Entry Struct Reference

Log entry structure. More...

#include <LogBook.h>

Public Member Functions

 Entry ()
 Default contructor.
 
 Entry (const std::string &strMark, const std::string &strText)
 Initialization contructor. More...
 
 Entry (const Entry &src)
 Copy contructor. More...
 
virtual ~Entry ()
 Destructor.
 
Entryoperator= (const Entry &rhs)
 Assignment operator. More...
 
bool empty ()
 Test if entry is empty ("no entry" entry). More...
 

Public Attributes

timespec m_timestamp
 entry timestamp
 
std::string m_strMark
 entry bookmark, empty if no mark
 
std::string m_strText
 entry text, empty if no text
 

Detailed Description

Log entry structure.

Definition at line 108 of file LogBook.h.

Constructor & Destructor Documentation

rnr::LogBook::Entry::Entry ( const std::string &  strMark,
const std::string &  strText 
)

Initialization contructor.

Parameters
strMarkEntry bookmark.
strTextEntry text.
LogBook::Entry::Entry ( const Entry src)

Copy contructor.

Parameters
srcSource object.

Definition at line 99 of file LogBook.cxx.

References m_strMark, m_strText, and m_timestamp.

100 {
101  m_timestamp = src.m_timestamp;
102  m_strMark = src.m_strMark;
103  m_strText = src.m_strText;
104 }
std::string m_strText
entry text, empty if no text
Definition: LogBook.h:112
std::string m_strMark
entry bookmark, empty if no mark
Definition: LogBook.h:111
timespec m_timestamp
entry timestamp
Definition: LogBook.h:110

Member Function Documentation

bool LogBook::Entry::empty ( )

Test if entry is empty ("no entry" entry).

Returns
Returns true or false.

Definition at line 117 of file LogBook.cxx.

References rnr::chronos::isSet(), m_strMark, m_strText, and m_timestamp.

118 {
119  return m_strMark.empty() && m_strText.empty() && !isSet(m_timestamp);
120 }
bool isSet(const timespec &a)
Check if timespec is set.
Definition: Time.cxx:105
std::string m_strText
entry text, empty if no text
Definition: LogBook.h:112
std::string m_strMark
entry bookmark, empty if no mark
Definition: LogBook.h:111
timespec m_timestamp
entry timestamp
Definition: LogBook.h:110
LogBook::Entry & LogBook::Entry::operator= ( const Entry rhs)

Assignment operator.

Parameters
rhsRight-hand side object.
Returns
*this

Definition at line 106 of file LogBook.cxx.

References m_strMark, m_strText, and m_timestamp.

107 {
108  m_timestamp = rhs.m_timestamp;
109  m_strMark = rhs.m_strMark;
110  m_strText = rhs.m_strText;
111 }
std::string m_strText
entry text, empty if no text
Definition: LogBook.h:112
std::string m_strMark
entry bookmark, empty if no mark
Definition: LogBook.h:111
timespec m_timestamp
entry timestamp
Definition: LogBook.h:110

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