9 if (comment.find_first_of(
'#') != 0) {
13 auto trimmed_comment =
trim(comment.substr(1, std::string::npos));
15 auto div = trimmed_comment.find_first_of(
',');
17 if (div == std::string::npos) {
21 std::string first {
trim(trimmed_comment.substr(0, div))};
23 std::string second {
trim(trimmed_comment.substr(div + 1, std::string::npos))};
29 if (std::isfinite(i) && std::isfinite(j)) {
39 if (comment.find_first_of(
'#') != 0) {
43 auto trimmed_comment =
trim(comment.substr(1, std::string::npos));
45 auto div = trimmed_comment.find_first_of(
',');
47 if (div == std::string::npos) {
51 std::string first {
trim(trimmed_comment.substr(0, div))};
53 std::string second {
trim(trimmed_comment.substr(div + 1, std::string::npos))};
59 if (std::isfinite(i) && std::isfinite(j)) {
69 if (comment.find_first_of(
'#') != 0) {
73 auto trimmed_comment =
trim(comment.substr(1, std::string::npos));
75 auto div = trimmed_comment.find_first_of(
',');
77 if (div == std::string::npos) {
81 std::string first {
trim(trimmed_comment.substr(0, div))};
83 std::string second {
trim(trimmed_comment.substr(div + 1, std::string::npos))};
92 catch(
const std::exception&) {
101 if (comment.find_first_of(
'#') != 0) {
105 auto trimmed_comment =
trim(comment.substr(1, std::string::npos));
107 auto div = trimmed_comment.find_first_of(
' ');
109 if (div == std::string::npos) {
113 auto first = trimmed_comment.substr(0, div);
115 auto second = trimmed_comment.substr(div + 1, std::string::npos);
117 type.replace(0, type.size(), first);
119 name.replace(0, name.size(), second);
126 if (comment.find_first_of(
'#') != 0) {
130 auto trimmed_comment =
trim(comment.substr(1, std::string::npos));
132 auto first = trimmed_comment.substr(0, std::string::npos);
134 label.replace(0, label.size(), first);
bool parseRangeComment(const std::string &comment, double &from, double &to)
bool parseLabelComment(const std::string &comment, std::string &label)
bool parseTypeNameComment(const std::string &comment, std::string &type, std::string &name)
int32_t strtol(const char *num)
double_t atof(const char *num)
std::string trim(const std::string &s)