#include <AuditLine.hh>
Public Member Functions | |
AuditLine () | |
AuditLine constructor. | |
AuditLine (unsigned short, unsigned short, unsigned short, std::string) | |
AuditLine constructor. | |
~AuditLine () | |
AuditLine destructor. Nothing to be done. | |
void | write (std::ofstream &) |
Write data to file. | |
void | addComment (const std::string &) |
Add str at the end of comment. | |
void | end (unsigned short event_status=e_NO_EXCEPTION, std::string reason="") |
Finish the line with a status and reason. | |
unsigned short | getLevel () const |
unsigned short | getStatus () const |
bool | started () const |
void | setFederation (Handle h) |
void | setFederate (FederateHandle h) |
void | setLevel (unsigned short l) |
Private Attributes | |
Handle | federation |
FederateHandle | federate |
unsigned short | type |
unsigned short | level |
unsigned short | status |
bool | modified |
time_t | date |
date, automatically set at construction time. | |
std::string | comment |
comment internally managed. |
Definition at line 36 of file AuditLine.hh.
AuditLine | ( | ) |
AuditLine constructor.
Initialise internal parameters to null.
Definition at line 43 of file AuditLine.cc.
AuditLine | ( | unsigned short | event_type, | |
unsigned short | event_level, | |||
unsigned short | event_status, | |||
std::string | reason | |||
) |
~AuditLine | ( | ) |
void write | ( | std::ofstream & | audit_file | ) |
Write data to file.
Write a line to the audit file.
Write module writes a line to the AuditFile stream. Line ends by a newline. Formatting is as follows :
Definition at line 98 of file AuditLine.cc.
References AuditLine::comment, AuditLine::date, AuditLine::federate, AuditLine::federation, AuditLine::level, AuditLine::status, and AuditLine::type.
Referenced by AuditFile::endLine(), and AuditFile::putLine().
void addComment | ( | const std::string & | str | ) |
Add str at the end of comment.
addComment adds information to the comment parameter.
Definition at line 70 of file AuditLine.cc.
References AuditLine::comment, and AuditLine::modified.
Referenced by AuditLine::end(), and AuditFile::operator<<().
void end | ( | unsigned short | event_status = e_NO_EXCEPTION , |
|
std::string | reason = "" | |||
) |
Finish the line with a status and reason.
Definition at line 79 of file AuditLine.cc.
References AuditLine::addComment(), and AuditLine::status.
Referenced by AuditFile::endLine().
unsigned short getLevel | ( | ) | const [inline] |
Definition at line 47 of file AuditLine.hh.
References AuditLine::level.
Referenced by AuditFile::endLine().
unsigned short getStatus | ( | ) | const [inline] |
Definition at line 48 of file AuditLine.hh.
References AuditLine::status.
Referenced by AuditFile::endLine().
bool started | ( | ) | const [inline] |
Definition at line 49 of file AuditLine.hh.
References AuditLine::modified.
Referenced by AuditFile::endLine(), and AuditFile::startLine().
void setFederation | ( | Handle | h | ) |
Definition at line 108 of file AuditLine.cc.
References AuditLine::federation, and AuditLine::modified.
Referenced by AuditFile::startLine().
void setFederate | ( | FederateHandle | h | ) |
Definition at line 115 of file AuditLine.cc.
References AuditLine::federate, and AuditLine::modified.
Referenced by AuditFile::startLine().
void setLevel | ( | unsigned short | l | ) |
Definition at line 122 of file AuditLine.cc.
References AuditLine::level, and AuditLine::modified.
Referenced by AuditFile::setLevel().
Handle federation [private] |
Definition at line 55 of file AuditLine.hh.
Referenced by AuditLine::setFederation(), and AuditLine::write().
FederateHandle federate [private] |
Definition at line 56 of file AuditLine.hh.
Referenced by AuditLine::setFederate(), and AuditLine::write().
unsigned short type [private] |
unsigned short level [private] |
Definition at line 58 of file AuditLine.hh.
Referenced by AuditLine::getLevel(), AuditLine::setLevel(), and AuditLine::write().
unsigned short status [private] |
Definition at line 59 of file AuditLine.hh.
Referenced by AuditLine::end(), AuditLine::getStatus(), and AuditLine::write().
bool modified [private] |
Definition at line 60 of file AuditLine.hh.
Referenced by AuditLine::addComment(), AuditLine::setFederate(), AuditLine::setFederation(), AuditLine::setLevel(), and AuditLine::started().
time_t date [private] |
date, automatically set at construction time.
Definition at line 62 of file AuditLine.hh.
Referenced by AuditLine::write().
std::string comment [private] |
comment internally managed.
Definition at line 63 of file AuditLine.hh.
Referenced by AuditLine::addComment(), and AuditLine::write().