YARP
Yet Another Robot Platform
RunCheckpoints.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_RUN_IMPL_RUNCHECKPOINTS_H
8 #define YARP_RUN_IMPL_RUNCHECKPOINTS_H
9 
10 #include <string>
11 #include <list>
12 
13 class YarprunCheckpoints // singleton
14 {
15 private:
17 
18 public:
20 
21  static YarprunCheckpoints& instance();
22 
23  void checkpoint(const char* prefix, const char* sFile, const char* sFunction, int line);
24 
25 private:
26  FILE* mLogFile;
27 };
28 
29 #ifdef YARPRUN_LOG
30 # define RUNLOG(msg) YarprunCheckpoints::instance().checkpoint(msg, __FILE__, __FUNCTION__, __LINE__);
31 #else
32 # define RUNLOG(msg)
33 #endif
34 
35 #endif // YARP_RUN_IMPL_RUNCHECKPOINTS_H
static YarprunCheckpoints & instance()
void checkpoint(const char *prefix, const char *sFile, const char *sFunction, int line)