FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
LogPotentialDataWarnings.h
1#ifndef LogPotentialDataWarnings_h__
2#define LogPotentialDataWarnings_h__
3
4#include "PotentialData.h"
5
6#include <fhsim/PrintDuringExec.h>
7
8#include <string>
9
10namespace Ship
11{
12
15inline void LogPotentialDataWarnings(PotentialData& data, PrintDuringExec* printer, const std::string& objectName)
16{
17 if (!printer) {
18 return;
19 }
20 for (const std::string& warning : data.Warnings()) {
21 printer->WriteLog(objectName + ": " + warning, fhsim::LogLevel_Warning);
22 }
23 data.ClearWarnings();
24}
25
26} // namespace Ship
27
28#endif // LogPotentialDataWarnings_h__
Definition PotentialData.h:29
const std::vector< std::string > & Warnings() const
What the reader noted while it read the data (a missing optional file). The ship logs each once.
Definition PotentialData.h:76
Simple waypoint object.
Definition CableAttach.h:16
void LogPotentialDataWarnings(PotentialData &data, PrintDuringExec *printer, const std::string &objectName)
Definition LogPotentialDataWarnings.h:15