#include <CommentedTextParser.hpp>
Definition at line 27 of file CommentedTextParser.hpp.
◆ CommentedTextParser() [1/2]
| BOL::CommentedTextParser::CommentedTextParser |
( |
std::string const & |
commentMarker, |
|
|
bool const |
isVerbose |
|
) |
| |
◆ CommentedTextParser() [2/2]
| BOL::CommentedTextParser::CommentedTextParser |
( |
VectorlikeArray< std::string > const & |
commentMarkerSet, |
|
|
bool const |
isVerbose |
|
) |
| |
◆ ~CommentedTextParser()
| BOL::CommentedTextParser::~CommentedTextParser |
( |
| ) |
|
|
virtual |
◆ atEndOfFile()
| bool BOL::CommentedTextParser::atEndOfFile |
( |
| ) |
|
|
inline |
◆ closeFile()
◆ openFile()
| bool BOL::CommentedTextParser::openFile |
( |
std::string const & |
fileName | ) |
|
|
inline |
Definition at line 146 of file CommentedTextParser.hpp.
151 {
153
154
157 &&
159 {
161 }
162 else
163 {
164 std::cout
165 << std::endl
166 << "BOL::error! CommentedTextParser tried to open "
167 << fileName << " but could not (or " << fileName << " is empty)!";
168 std::cout << std::endl;
170 }
172 }
◆ parseNextLineOfFile()
| bool BOL::CommentedTextParser::parseNextLineOfFile |
( |
std::string & |
stringForData, |
|
|
std::string & |
stringForComment |
|
) |
| |
|
inline |
Definition at line 194 of file CommentedTextParser.hpp.
202 {
204 {
209 &stringForComment ) );
210
211
212
213
216 return true;
217 }
218 else
219 {
220 return false;
221 }
222 }
static std::string trimFromBack(std::string const &stringToTrim, std::string const &charsToTrim)
static std::string const newlineChars
static std::string substringToFirst(std::string const &stringToParse, VectorlikeArray< std::string > const &delimitersOfSubstring, std::string *const remainderString=NULL)
◆ parseString()
| VectorlikeArray< std::pair< std::string, std::string > > const & BOL::CommentedTextParser::parseString |
( |
std::string const & |
textToParse | ) |
|
|
inline |
Definition at line 115 of file CommentedTextParser.hpp.
122 {
126
127
130 0 <= lineIndex;
131 --lineIndex )
132 {
137
138
139
140
141 }
143 }
static void parseByChar(std::string const &stringToParse, VectorlikeArray< std::string > &destinationArray, std::string const &divisionCharSet=whitespaceChars)
VectorlikeArray< StoredClass > & setSize(int const newSize)
◆ readInNextLine()
| bool BOL::CommentedTextParser::readInNextLine |
( |
| ) |
|
|
inlineprotected |
Definition at line 257 of file CommentedTextParser.hpp.
264 {
266 {
271 &&
273 {
275 }
276 return true;
277 }
278 else
279 {
280 return false;
281 }
282 }
◆ readJustNextValidLine()
| bool BOL::CommentedTextParser::readJustNextValidLine |
( |
std::string & |
stringToFill | ) |
|
|
inline |
◆ readNextNonEmptyLineOfFileWithoutComment()
| bool BOL::CommentedTextParser::readNextNonEmptyLineOfFileWithoutComment |
( |
std::string & |
stringToFill | ) |
|
|
inline |
Definition at line 225 of file CommentedTextParser.hpp.
234 {
235 stringToFill.clear();
236 while( stringToFill.empty()
237 &&
239
240
241 {
244
245
246
247
249 stringToFill,
251 }
252
253 return !(stringToFill.empty());
254 }
static std::string trimFromFrontAndBack(std::string const &stringToTrim, std::string const &charsToTrim=whitespaceAndNewlineChars)
◆ reportStateOfFile()
| void BOL::CommentedTextParser::reportStateOfFile |
( |
| ) |
|
|
inlineprotected |
Definition at line 285 of file CommentedTextParser.hpp.
288 {
290
291 {
292 std::cout
293 << std::endl
294 << "BOL::CommentedTextParser reached the end of the file.";
295 std::cout << std::endl;
296 }
297 else
298 {
299 std::cout
300 << std::endl
301 << "BOL::CommentedTextParser cannot read in any more of the file after"
302 << " a bad reading operation.";
303 std::cout << std::endl;
304 }
305 }
◆ commentMarkerSet
◆ inputFile
| std::ifstream BOL::CommentedTextParser::inputFile |
|
protected |
◆ isVerbose
| bool const BOL::CommentedTextParser::isVerbose |
|
protected |
◆ lineBeingRead
| std::string BOL::CommentedTextParser::lineBeingRead |
|
protected |
◆ linesOfFileRemain
| bool BOL::CommentedTextParser::linesOfFileRemain |
|
protected |
◆ parsedLine
| std::pair< std::string, std::string > BOL::CommentedTextParser::parsedLine |
|
protected |
◆ parsedText
| VectorlikeArray< std::pair< std::string, std::string > > BOL::CommentedTextParser::parsedText |
|
protected |
◆ textAsLines
◆ trimmingChars
| std::string const BOL::CommentedTextParser::trimmingChars |
|
staticprotected |
The documentation for this class was generated from the following files: