Developer Application Interface (ARC API) v3.6.2
ARC, Inc. GenII/III Application Interface
arc::gen3::CArcLog Class Reference

#include <CArcLog.h>

Public Member Functions

 CArcLog (void)
 
 ~CArcLog (void)=default
 
void setMaxSize (const std::uint32_t ulSize) noexcept
 
void put (const char *szFmt,...)
 
const std::string getNext (void) noexcept
 
const std::string getLast (void) noexcept
 
std::uint32_t getLogCount (void) noexcept
 
bool empty (void) noexcept
 
void selfTest (void)
 

Detailed Description

ARC message logging class

See also
arc::gen3::CArcPCI

Constructor & Destructor Documentation

◆ CArcLog()

arc::gen3::CArcLog::CArcLog ( void  )

Default constructor

◆ ~CArcLog()

arc::gen3::CArcLog::~CArcLog ( void  )
default

Default destructor

Member Function Documentation

◆ empty()

bool arc::gen3::CArcLog::empty ( void  )
noexcept

Returns whether or not the log contains any messages

Returns
true if the log is empty; false otherwise.

◆ getLast()

const std::string arc::gen3::CArcLog::getLast ( void  )
noexcept

Returns and removes the newest string from the log. Applications should call empty() to check if more messages are available.

Returns
The newest message in the log

◆ getLogCount()

std::uint32_t arc::gen3::CArcLog::getLogCount ( void  )
noexcept

Returns the number of messages in the log

Returns
The number of available messages

◆ getNext()

const std::string arc::gen3::CArcLog::getNext ( void  )
noexcept

Returns and removes the oldest string from the log. Applications should call empty() to check if more messages are available.

Returns
The oldest message in the log

◆ put()

void arc::gen3::CArcLog::put ( const char *  szFmt,
  ... 
)

Inserts a message into the log. It dumps the oldest message if the log size is greater than or equal to the max size.

Parameters
szFmt- C-printf style format (sort of): d -> Integer f -> Double s -> Char *, std::string not accepted x,X -> Integer as hex, produces uppercase only e -> Special case that produces a std::string message from one of the system functions ::GetLastError or strerror, depending on the OS.
Exceptions
Anyexception thrown by std::queue

◆ selfTest()

void arc::gen3::CArcLog::selfTest ( void  )

Performs a self-test. Output goes to a message box on windows and to the terminal on linux systems.

Exceptions
Anyexception thrown by std::stringstream

◆ setMaxSize()

void arc::gen3::CArcLog::setMaxSize ( const std::uint32_t  ulSize)
noexcept

Sets the maximum number of messages that the log can hold.

Parameters
ulSize- The maximum number of messages the log can hold. Must be > 0.

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