OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ProgressLogger.h
Go to the documentation of this file.
1#pragma once
2
3class Application;
4
5#include <vector>
6#include <map>
7#include <string>
8#include <thread>
9
11{
12public:
15
16 void startLogger2D(bool verbose);
17 void stopLogger2D(void);
18
19 void startLogger3D(bool verbose);
20 void stopLogger3D(void);
21
22 bool isInvalidSurface(int faceTag) { return invalidSurfaces.find(faceTag) != invalidSurfaces.end(); }
23 bool hasInvalidSurfacePoint(int faceTag) { return invalidSurfacesPoints.find(faceTag) != invalidSurfacesPoints.end(); }
24 std::vector<std::string> getInvalidSurfacePoints(int faceTag) { return invalidSurfacesPoints[faceTag]; }
25
26 void showLogMessages(bool flag) { showLogMessagesFlag = flag; }
27
28private:
29 void readLogInformation2D(bool verbose, size_t edges, size_t faces);
30 void readLogInformation3D(bool verbose);
31 std::string process3DErrorMessages(bool verbose, std::vector<std::string> &messages3D);
32 bool parseErrorString(const std::string &message, std::string format, std::vector<std::string> &values);
33 int getSurfaceId(std::string &text);
34
35 Application *application;
36 bool loggerRunning;
37 std::thread *workerThread;
38 bool verboseFlag;
39 bool showLogMessagesFlag;
40
41 std::map<int, bool> invalidSurfaces;
42 std::map<int, std::vector<std::string>> invalidSurfacesPoints;
43};
@ edges
Definition MonitorSettings.h:17
Definition Application.h:25
Definition ProgressLogger.h:11
void showLogMessages(bool flag)
Definition ProgressLogger.h:26
bool isInvalidSurface(int faceTag)
Definition ProgressLogger.h:22
~ProgressLogger()
Definition ProgressLogger.cpp:21
void startLogger3D(bool verbose)
Definition ProgressLogger.cpp:107
ProgressLogger(Application *app)
Definition ProgressLogger.cpp:12
void stopLogger3D(void)
Definition ProgressLogger.cpp:120
void startLogger2D(bool verbose)
Definition ProgressLogger.cpp:36
void stopLogger2D(void)
Definition ProgressLogger.cpp:60
std::vector< std::string > getInvalidSurfacePoints(int faceTag)
Definition ProgressLogger.h:24
bool hasInvalidSurfacePoint(int faceTag)
Definition ProgressLogger.h:23
The app namespace contains several functions that may be used to start processes.