nx_camera_sdk  1.0
Camera SDK
output_redirector.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <string>
6 
7 #if !defined(NX_KIT_API)
8  #define NX_KIT_API
9 #endif
10 
11 namespace nx {
12 namespace kit {
13 
33 class NX_KIT_API OutputRedirector
34 {
35 public:
36  OutputRedirector(const OutputRedirector&) = delete;
37 
38  void operator=(const OutputRedirector&) = delete;
39 
40  static const OutputRedirector& getInstance();
41 
49  static void ensureOutputRedirection();
50 
51 protected: //< Intended for unit tests.
53 
54  static void redirectStdoutAndStderrIfNeeded(const char* overridingLogFilesDir = nullptr);
55 };
56 
57 } // namespace kit
58 } // namespace nx
Definition: apple_utils.h:6
Definition: output_redirector.h:33