Parameter entry.
More...
#include <ParameterEntry.hpp>
Parameter entry.
- Describes the data relative to a parameter in a parameters file.
- Objects of this class are stored in a ParameterEntries object.
Definition at line 66 of file ParameterEntry.hpp.
◆ ParameterEntry()
ParameterEntry::ParameterEntry |
( |
const std::string & |
entry, |
|
|
bool |
removeComments = true |
|
) |
| |
|
explicit |
Constructor.
Ignores all entries after '#'
.
- Parameters
-
entry | A string describing the parameter entry – IN. |
removeComments | A boolean equal to true if entries after '#' are ignored – IN (Opt) (default = true ). |
◆ ~ParameterEntry()
virtual ParameterEntry::~ParameterEntry |
( |
void |
| ) |
|
|
inlinevirtual |
◆ display()
void ParameterEntry::display |
( |
std::ostream & |
out | ) |
const |
Display.
- Parameters
-
out | The std::ostream object – IN. |
◆ getAllValues()
std::string ParameterEntry::getAllValues |
( |
void |
| ) |
const |
◆ getLine()
const int& ParameterEntry::getLine |
( |
void |
| ) |
const |
|
inline |
Access to the line number for this parameter in the parameter file.
- Returns
- The line number at which this parameter can be found in the parameter file.
Definition at line 162 of file ParameterEntry.hpp.
◆ getName()
const std::string& ParameterEntry::getName |
( |
void |
| ) |
const |
|
inline |
◆ getNbValues()
size_t ParameterEntry::getNbValues |
( |
void |
| ) |
const |
|
inline |
Access to the number of values of the parameter.
- Returns
- The number of values.
Definition at line 119 of file ParameterEntry.hpp.
◆ getNext()
std::shared_ptr<ParameterEntry> ParameterEntry::getNext |
( |
void |
| ) |
const |
|
inline |
◆ getParamFile()
const std::string& ParameterEntry::getParamFile |
( |
void |
| ) |
const |
|
inline |
Access to the parameter file of the parameter.
- Returns
- The parameter file where this parameter was read.
Definition at line 156 of file ParameterEntry.hpp.
◆ getValues()
const std::list<std::string>& ParameterEntry::getValues |
( |
void |
| ) |
const |
|
inline |
Access to the parameter values.
- Returns
- The parameter values as a list of strings.
Definition at line 111 of file ParameterEntry.hpp.
◆ hasBeenInterpreted()
bool ParameterEntry::hasBeenInterpreted |
( |
void |
| ) |
const |
|
inline |
Access to the _hasBeenInterpreted
flag.
- Returns
- A boolean equal to
true
if the parameter has already been interpreted.
Definition at line 150 of file ParameterEntry.hpp.
◆ isOk()
bool ParameterEntry::isOk |
( |
void |
| ) |
const |
|
inline |
Access to the _ok
flag.
This flag is equal to true
if the parameter entry is well defined.
- Returns
- A boolean equal to
true
if the parameter is valid.
Definition at line 126 of file ParameterEntry.hpp.
◆ isUnique()
bool ParameterEntry::isUnique |
( |
void |
| ) |
const |
|
inline |
Access to the _unique
flag.
This flag is decided when a parameters file is read.
- Returns
- A boolean equal to
true
if the parameter is unique in a parameters file.
Definition at line 134 of file ParameterEntry.hpp.
◆ operator<()
Comparison with another entry.
The comparison is based on the parameter name.
- Parameters
-
p | The right-hand side object – IN. |
- Returns
- A boolean equal to
true
if this->_name
<
p._name
.
Definition at line 196 of file ParameterEntry.hpp.
◆ setHasBeenInterpreted()
void ParameterEntry::setHasBeenInterpreted |
( |
void |
| ) |
|
|
inline |
◆ setLine()
void ParameterEntry::setLine |
( |
int |
line | ) |
|
|
inline |
Set the line _line
for this parameter in the parameter file.
Definition at line 187 of file ParameterEntry.hpp.
◆ setNext()
◆ setParamFile()
void ParameterEntry::setParamFile |
( |
const std::string & |
paramFile | ) |
|
|
inline |
◆ setUnique()
void ParameterEntry::setUnique |
( |
bool |
u | ) |
|
|
inline |
◆ _hasBeenInterpreted
bool ParameterEntry::_hasBeenInterpreted |
|
private |
◆ _line
int ParameterEntry::_line |
|
private |
◆ _name
std::string ParameterEntry::_name |
|
private |
◆ _next
◆ _ok
◆ _paramFile
std::string ParameterEntry::_paramFile |
|
private |
◆ _unique
bool ParameterEntry::_unique |
|
private |
◆ _values
std::list<std::string> ParameterEntry::_values |
|
private |
The documentation for this class was generated from the following file: