YARP
Yet Another Robot Platform
RunCheckpoints.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_RUN_IMPL_RUNCHECKPOINTS_H
11 #define YARP_RUN_IMPL_RUNCHECKPOINTS_H
12 
13 #include <string>
14 #include <list>
15 
16 class YarprunCheckpoints // singleton
17 {
18 private:
20 
21 public:
23 
24  static YarprunCheckpoints& instance();
25 
26  void checkpoint(const char* prefix, const char* sFile, const char* sFunction, int line);
27 
28 private:
29  FILE* mLogFile;
30 };
31 
32 #ifdef YARPRUN_LOG
33 # define RUNLOG(msg) YarprunCheckpoints::instance().checkpoint(msg, __FILE__, __FUNCTION__, __LINE__);
34 #else
35 # define RUNLOG(msg)
36 #endif
37 
38 #endif // YARP_RUN_IMPL_RUNCHECKPOINTS_H
static YarprunCheckpoints & instance()
void checkpoint(const char *prefix, const char *sFile, const char *sFunction, int line)