master
a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models
CommentedTextParser.cpp
Go to the documentation of this file.
1
/*
2
* CommentedTextParser.cpp
3
*
4
* Created on: Jan 22, 2012
5
* Author: Ben O'Leary (benjamin.oleary@gmail.com)
6
*
7
* This file is part of BOLlib, released under the
8
* GNU General Public License. Please see the accompanying
9
* README.BOLlib.txt file for a full list of files, brief documentation
10
* on how to use these classes, and further details on the license.
11
*/
12
13
#include "
CommentedTextParser.hpp
"
14
15
namespace
BOL
16
{
17
std::string
const
CommentedTextParser::trimmingChars
(
" \t\r"
);
18
19
CommentedTextParser::CommentedTextParser
( std::string
const
& commentMarker,
20
bool
const
isVerbose ) :
21
isVerbose( isVerbose ),
22
commentMarkerSet( 1 ),
23
parsedText(),
24
parsedLine(
""
,
25
""
),
26
textAsLines(),
27
lineBeingRead(
""
),
28
linesOfFileRemain( false ),
29
inputFile()
30
{
31
commentMarkerSet
.getFront().assign( commentMarker );
32
}
33
34
CommentedTextParser::CommentedTextParser
(
35
VectorlikeArray< std::string >
const
& commentMarkerSet,
36
bool
const
isVerbose ) :
37
isVerbose( isVerbose ),
38
commentMarkerSet( commentMarkerSet ),
39
parsedText(),
40
parsedLine(
""
,
41
""
),
42
textAsLines(),
43
lineBeingRead(
""
),
44
linesOfFileRemain( false ),
45
inputFile()
46
{
47
// just an initialization list.
48
}
49
50
CommentedTextParser::~CommentedTextParser
()
51
{
52
if
(
inputFile
.is_open() )
53
{
54
inputFile
.close();
55
}
56
}
57
58
}
CommentedTextParser.hpp
BOL::CommentedTextParser::commentMarkerSet
VectorlikeArray< std::string > commentMarkerSet
Definition:
CommentedTextParser.hpp:87
BOL::CommentedTextParser::CommentedTextParser
CommentedTextParser(std::string const &commentMarker, bool const isVerbose)
Definition:
CommentedTextParser.cpp:19
BOL::CommentedTextParser::~CommentedTextParser
virtual ~CommentedTextParser()
Definition:
CommentedTextParser.cpp:50
BOL::CommentedTextParser::inputFile
std::ifstream inputFile
Definition:
CommentedTextParser.hpp:95
BOL::CommentedTextParser::trimmingChars
static std::string const trimmingChars
Definition:
CommentedTextParser.hpp:84
BOL::VectorlikeArray
Definition:
VectorlikeArray.hpp:31
BOL
Definition:
ArgumentParser.hpp:23
LHPC
include
BOLlib
source
CommentedTextParser.cpp
Generated on Mon Aug 4 2025 for $\texttt{HEPfit}$ using
1.9.2