VR-Link API Documentation for HLA 4
 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) 1992-2025 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 
23 #ifdef DtUSE_UTILITIES_NAMESPACE
24 namespace DtUSE_UTILITIES_NAMESPACE
25 {
26 #endif
27 
28 // Note that this protocol does not define correctly within vrfutil.
29 // Instead the expectation is that users will use the preprocessor directives
30 // in their own main and then when including this it will allow a macro/define to be usable.
31 #ifdef DtDIS
32 #define DT_PROTOCOL_SHORT_NAME "DIS"
33 #elif DtHLA
34 #ifdef DtHLA_1516
35 #ifdef DtHLA_4
36 #define DT_PROTOCOL_SHORT_NAME "HLA1516_2025"
37 #elif DtHLA_1516_EVOLVED
38 #define DT_PROTOCOL_SHORT_NAME "HLA1516e"
39 #else
40 #define DT_PROTOCOL_SHORT_NAME "HLA1516"
41 #endif
42 #else
43 #define DT_PROTOCOL_SHORT_NAME "HLA13"
44 #endif
45 #else
46 #define DT_PROTOCOL_SHORT_NAME ""
47 #endif
48 
52 {
53 public:
54  DtLogFileInfo();
55  ~DtLogFileInfo() = default;
56 
57  DtLogFileInfo(DtLogFileInfo&) = default;
58  DtLogFileInfo(DtLogFileInfo&&) = default;
59 
60  static DtLogFileInfo& instance();
61 
62  std::string getFullString();
63  std::string getLogFileName();
64 
65  std::string getAppName();
66  void setAppName(const std::string&);
67 
68  std::string getProtocol();
69  void setProtocol(const std::string&);
70 
71  std::string getVersion();
72  void setVersion(const std::string&);
73 
74  std::string getSvnRev();
75  void setSvnRev(const std::string&);
76 
77  // Automatically set
78  std::string getDate();
79  std::string getTime();
80  std::string getHostname();
81  std::string getPid();
82 
83 #ifndef WIN32
84  typedef void (*SigActionCb)( int, siginfo_t*, void* );
85  static void setupErrorHandling();
86  static void DtPrintAddrLines(int sig, siginfo_t* info, void* secret);
87 #endif
88 protected:
90 
91  std::string myAppName;
92  std::string myDate;
93  std::string myHostname;
94  std::string myProtocol;
95  std::string mySvnRev;
96  std::string myTime;
97  std::string myVersion;
98  std::string myPid;
99 };
100 
101 
102 #ifdef DtUSE_UTILITIES_NAMESPACE
103 } // end of namespace DtUSE_VLUTIL_NAMESPACE
104 #endif
105 
std::string myPid
Definition: vlLogFileInfo.h:98
void(* SigActionCb)(int, siginfo_t *, void *)
Definition: vlMiniDumper.h:157
std::string myVersion
Definition: vlLogFileInfo.h:97
std::string myTime
Definition: vlLogFileInfo.h:96
static DtLogFileInfo * theLogFileInstance
Definition: vlLogFileInfo.h:89
std::string myProtocol
Definition: vlLogFileInfo.h:94
Class DtLogFileInfo is a Singleton which contains the necessary information to name ...
Definition: vlLogFileInfo.h:51
std::string myHostname
Definition: vlLogFileInfo.h:93
std::string myDate
Definition: vlLogFileInfo.h:92
std::string myAppName
Definition: vlLogFileInfo.h:91
This file contains typedefs for machine dependant types.
std::string mySvnRev
Definition: vlLogFileInfo.h:95
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)