Developer Application Interface (ARC API) v3.6.2
ARC, Inc. GenII/III Application Interface
CArcLog.h
Go to the documentation of this file.
1// +------------------------------------------------------------------------------------------------------------------+
2// | FILE: CArcLog.h |
3// +------------------------------------------------------------------------------------------------------------------+
4// | PURPOSE: This file defines the message logging class. |
5// | |
6// | AUTHOR: Scott Streit DATE: ? |
7// | |
8// | Copyright Astronomical Research Cameras, Inc. All rights reserved. |
9// +------------------------------------------------------------------------------------------------------------------+
12#pragma once
13
14
15#ifdef _WINDOWS
16#pragma warning( disable: 4251 )
17#endif
18
19#include <queue>
20#include <string>
21#include <sstream>
22#include <cstdarg>
23#include <memory>
24
25#include <CArcDeviceDllMain.h>
26
27
28namespace arc
29{
30 namespace gen3
31 {
32
39 class GEN3_CARCDEVICE_API CArcLog
40 {
41 public:
42
45 CArcLog( void );
46
49 ~CArcLog( void ) = default;
50
54 void setMaxSize( const std::uint32_t ulSize ) noexcept;
55
67 void put( const char* szFmt, ... );
68
72 const std::string getNext( void ) noexcept;
73
77 const std::string getLast( void ) noexcept;
78
82 std::uint32_t getLogCount( void ) noexcept;
83
87 bool empty( void ) noexcept;
88
92 void selfTest( void );
93
94 private:
95
97 static std::queue<std::string>::size_type Q_MAX;
98
100 std::unique_ptr<std::queue<std::string>> m_sQueue;
101 };
102
103 } // end gen3 namespace
104} // end arc namespace
Definition: CArcLog.h:40
~CArcLog(void)=default