debug.cpp
Go to the documentation of this file.
1 
17 #include "debug.h"
18 #include <fstream>
19 namespace aruco
20 {
21 int Debug::level = 2;
22 std::map<std::string, std::string> Debug::strings;
23 void Debug::addString(std::string &label, std::string &data)
24 {
25  strings.insert(make_pair(label, data));
26 }
27 
28 std::string Debug::getString(std::string &str)
29 {
30  auto it = strings.find(str);
31  if (it == strings.end())
32  return "";
33  else
34  return it->second;
35 }
36 
37 
38 bool Debug::isInited = false;
39 
40 void Debug::setLevel(int l)
41 {
42  level = l;
43  isInited = false;
44  init();
45 }
47 {
48  init();
49  return level;
50 }
52 {
53  if (!isInited)
54  {
55  isInited = true;
56  if (level >= 1)
57  {
58  }
59  }
60 }
61 
62 
63 } // namespace aruco
aruco::Debug::init
static void init()
Definition: debug.cpp:51
aruco::Debug::setLevel
static void setLevel(int l)
Definition: debug.cpp:40
aruco::Debug::addString
static void addString(std::string &label, std::string &data)
Definition: debug.cpp:23
aruco::Debug::level
static int level
Definition: debug.h:31
aruco::Debug::getLevel
static int getLevel()
Definition: debug.cpp:46
aruco::Debug::isInited
static bool isInited
Definition: debug.h:32
aruco::Debug::getString
static std::string getString(std::string &str)
Definition: debug.cpp:28
aruco::Debug::strings
static std::map< std::string, std::string > strings
Definition: debug.h:34
aruco
Definition: cameraparameters.h:24


aruco
Author(s): Rafael Muñoz Salinas , Bence Magyar
autogenerated on Sat Sep 23 2023 02:26:45