FileLogger.h
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
3 
4  Redistribution of this file, in original or modified form, without
5  prior written consent of Allied Vision Technologies is prohibited.
6 
7 -------------------------------------------------------------------------------
8 
9  File: FileLogger.h
10 
11  Description: Definition of class AVT::VmbAPI::FileLogger.
12 
13 -------------------------------------------------------------------------------
14 
15  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
16  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
17  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 =============================================================================*/
27 
28 #ifndef AVT_VMBAPI_FILELOGGER_H
29 #define AVT_VMBAPI_FILELOGGER_H
30 
31 #include <string>
32 #include <stdio.h>
33 #include <fstream>
34 
36 #include <VimbaCPP/Include/Mutex.h>
37 
38 namespace AVT {
39 namespace VmbAPI {
40 
42 {
43  public:
44  FileLogger( const char *pFileName, bool append = true );
45  virtual ~FileLogger();
46 
47  void Log( const std::string &StrMessage );
48 
49 private:
50  std::ofstream m_File;
51  MutexPtr m_pMutex;
52 
53  std::string GetTempPath();
54  FileLogger( const FileLogger& );
55  FileLogger& operator=( const FileLogger& );
56 };
57 
58 }} //namespace AVT:VmbAPI
59 
60 #endif
FileLogger(const char *pFileName, bool append=true)
Definition: FileLogger.cpp:43
std::string GetTempPath()
Definition: FileLogger.cpp:108
FileLogger & operator=(const FileLogger &)
Definition: FileLogger.cpp:72
void Log(const std::string &StrMessage)
Definition: FileLogger.cpp:86
std::ofstream m_File
Definition: FileLogger.h:50
ROSCPP_DECL std::string append(const std::string &left, const std::string &right)


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Wed Jun 5 2019 22:22:40