nx_metadata_sdk  1.0
Metadata SDK
log_utils.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 <map>
6 #include <string>
7 
8 namespace nx { namespace sdk { class IStringMap; } }
9 
10 namespace nx {
11 namespace sdk {
12 
26 struct LogUtils
27 {
28  const bool enableOutput;
29  std::string printPrefix;
30 
31  LogUtils(bool enableOutput, std::string printPrefix):
32  enableOutput(enableOutput), printPrefix(std::move(printPrefix))
33  {
34  }
35 
36  void setPrintPrefix(std::string newPrefix);
37 
45  std::map<std::string, std::string>* outMap,
46  const IStringMap* stringMap,
47  const std::string& caption,
48  int outputIndent = 0) const;
49 };
50 
51 } // namespace sdk
52 } // namespace nx
Definition: i_string_map.h:10
bool convertAndOutputStringMap(std::map< std::string, std::string > *outMap, const IStringMap *stringMap, const std::string &caption, int outputIndent=0) const
Definition: log_utils.cpp:19
Definition: apple_utils.h:6
Definition: log_utils.h:26