VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlLogFileInfo.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "vlMachineTypes.h"
13 #include <string>
14 #ifndef WIN32
15 
16 #include <map>
17 #include <signal.h>
18 #include <execinfo.h>
19 #include <ucontext.h>
20 
21 #endif
22 // Note that this protocol does not define correctly within vrfutil.
23 // Instead the expectation is that users will use the preprocessor directives
24 // in their own main and then when including this it will allow a macro/define to be usable.
25 #ifdef DtDIS
26 #define DT_PROTOCOL_SHORT_NAME "DIS"
27 #elif DtHLA
28 #ifdef DtHLA_1516
29 #ifdef DtHLA_1516_EVOLVED
30 #define DT_PROTOCOL_SHORT_NAME "HLA1516e"
31 #else
32 #define DT_PROTOCOL_SHORT_NAME "HLA1516"
33 #endif
34 #else
35 #define DT_PROTOCOL_SHORT_NAME "HLA13"
36 #endif
37 #else
38 #define DT_PROTOCOL_SHORT_NAME ""
39 #endif
40 
44 {
45 public:
46  DtLogFileInfo();
47  ~DtLogFileInfo() = default;
48 
49  DtLogFileInfo(DtLogFileInfo&) = default;
50  DtLogFileInfo(DtLogFileInfo&&) = default;
51 
52  static DtLogFileInfo& instance();
53 
54  std::string getFullString();
55  std::string getLogFileName();
56 
57  std::string getAppName();
58  void setAppName(const std::string&);
59 
60  std::string getProtocol();
61  void setProtocol(const std::string&);
62 
63  std::string getVersion();
64  void setVersion(const std::string&);
65 
66  std::string getSvnRev();
67  void setSvnRev(const std::string&);
68 
69  // Automatically set
70  std::string getDate();
71  std::string getTime();
72  std::string getHostname();
73  std::string getPid();
74 
75 #ifndef WIN32
76  typedef void (*SigActionCb)( int, siginfo_t*, void* );
77  static void setupErrorHandling();
78  static void DtPrintAddrLines(int sig, siginfo_t* info, void* secret);
79 #endif
80 protected:
82 
83  std::string myAppName;
84  std::string myDate;
85  std::string myHostname;
86  std::string myProtocol;
87  std::string mySvnRev;
88  std::string myTime;
89  std::string myVersion;
90  std::string myPid;
91 };
std::string myPid
Definition: vlLogFileInfo.h:90
void(* SigActionCb)(int, siginfo_t *, void *)
Definition: vlMiniDumper.h:156
std::string myVersion
Definition: vlLogFileInfo.h:89
std::string myTime
Definition: vlLogFileInfo.h:88
static DtLogFileInfo * theLogFileInstance
Definition: vlLogFileInfo.h:81
std::string myProtocol
Definition: vlLogFileInfo.h:86
Class DtLogFileInfo is a Singleton which contains the necessary information to name ...
Definition: vlLogFileInfo.h:43
std::string myHostname
Definition: vlLogFileInfo.h:85
std::string myDate
Definition: vlLogFileInfo.h:84
std::string myAppName
Definition: vlLogFileInfo.h:83
This file contains typedefs for machine dependant types.
std::string mySvnRev
Definition: vlLogFileInfo.h:87
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)