OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
Loading...
Searching...
No Matches
parse_info.cpp
Go to the documentation of this file.
1
#include "
parse_info.h
"
2
#include <sstream>
3
4
namespace
Odb::Lib::FileModel
5
{
6
std::string
parse_info::toString
(
const
std::string& message
/*= ""*/
)
const
7
{
8
std::stringstream ss;
9
10
if
(!message.empty())
11
{
12
ss << message << std::endl;
13
}
14
15
if
(!
dataFile
.empty() || !
dataLine
.empty() || !
dataToken
.empty())
16
{
17
ss <<
"current file: ["
<<
dataFile
.relative_path().string() <<
":"
<<
dataLineNumber
<<
"]"
<< std::endl
18
<<
"current line: ["
<<
dataLine
<<
"]"
<< std::endl
19
<<
"current token: ["
<<
dataToken
<<
"]"
;
20
}
21
22
return
ss.str();
23
}
24
}
Odb::Lib::FileModel
Definition
Constants.h:8
parse_info.h
Odb::Lib::FileModel::parse_info::dataLineNumber
int dataLineNumber
Definition
parse_info.h:12
Odb::Lib::FileModel::parse_info::dataFile
std::filesystem::path dataFile
Definition
parse_info.h:11
Odb::Lib::FileModel::parse_info::dataLine
std::string dataLine
Definition
parse_info.h:13
Odb::Lib::FileModel::parse_info::dataToken
std::string dataToken
Definition
parse_info.h:14
Odb::Lib::FileModel::parse_info::toString
std::string toString(const std::string &message="") const
Definition
parse_info.cpp:6
OdbDesignLib
FileModel
parse_info.cpp
Generated by
1.9.8