YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
parse_extraComments.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#include "generator.h"
7#include <sstream>
8#include <iomanip>
9#include <algorithm>
10#include <string>
11#include <iostream>
12#include <fstream>
13
14bool ParamsFilesGenerator::parseExtraComments(const std::string inputfilename)
15{
16 std::string line;
17
18 std::ifstream inputfile(inputfilename);
19
20 bool b = inputfile.is_open();
21 if (!b)
22 {
23 std::cerr << "Unable to open file: " << inputfilename << std::endl;
24 return false;
25 }
26
27 m_extra_comments.assign(std::istreambuf_iterator<char>(inputfile),
28 std::istreambuf_iterator<char>());
29
30 inputfile.close();
31 return true;
32}
bool parseExtraComments(std::string inputfilename)
std::string m_extra_comments
Definition generator.h:48