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::sdk {
11 
25 struct LogUtils
26 {
27  const bool enableOutput;
28  std::string printPrefix;
29 
30  LogUtils(bool enableOutput, std::string printPrefix):
31  enableOutput(enableOutput), printPrefix(std::move(printPrefix))
32  {
33  }
34 
35  void setPrintPrefix(std::string newPrefix);
36 
44  std::map<std::string, std::string>* outMap,
45  const IStringMap* stringMap,
46  const std::string& caption,
47  int outputIndent = 0) const;
48 };
49 
50 } // namespace nx::sdk
Definition: i_string_map.h:9
bool convertAndOutputStringMap(std::map< std::string, std::string > *outMap, const IStringMap *stringMap, const std::string &caption, int outputIndent=0) const
Definition: log_utils.cpp:18
Definition: apple_utils.h:6
Definition: device_agent.h:13
Definition: log_utils.h:25