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 22 of file ParameterEntry.hpp.
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 ). |
virtual ParameterEntry::~ParameterEntry |
( |
void |
| ) |
|
|
inlinevirtual |
void ParameterEntry::display |
( |
std::ostream & |
out | ) |
const |
Display.
- Parameters
-
out | The std::ostream object – IN. |
std::string ParameterEntry::getAllValues |
( |
void |
| ) |
const |
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 118 of file ParameterEntry.hpp.
int _line
Line for this parameter in _paramFile.
const std::string& ParameterEntry::getName |
( |
void |
| ) |
const |
|
inline |
Access to the name of the parameter.
- Returns
- The name.
Definition at line 61 of file ParameterEntry.hpp.
std::string _name
Name of the parameter.
size_t ParameterEntry::getNbValues |
( |
void |
| ) |
const |
|
inline |
Access to the number of values of the parameter.
- Returns
- The number of values.
Definition at line 75 of file ParameterEntry.hpp.
std::list< std::string > _values
List of values for the parameter.
std::shared_ptr<ParameterEntry> ParameterEntry::getNext |
( |
void |
| ) |
const |
|
inline |
Access to another ParameterEntry.
ParameterEntry objects are stored in a ParameterEntries object. The link between elements is assumed by the _next
member returned by this function.
- Returns
- A pointer to the next entry.
Definition at line 99 of file ParameterEntry.hpp.
std::shared_ptr< ParameterEntry > _next
Acces to the next parameter.
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 112 of file ParameterEntry.hpp.
std::string _paramFile
File from which this parameter was read.
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 67 of file ParameterEntry.hpp.
std::list< std::string > _values
List of values for the parameter.
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 106 of file ParameterEntry.hpp.
bool _hasBeenInterpreted
If the parameter has been interpreted.
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 82 of file ParameterEntry.hpp.
bool _ok
If the parameter is valid.
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 90 of file ParameterEntry.hpp.
bool _unique
If the parameter is unique.
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 151 of file ParameterEntry.hpp.
std::string _name
Name of the parameter.
void ParameterEntry::setHasBeenInterpreted |
( |
void |
| ) |
|
|
inline |
Set the _hasBeenInterpreted
flag. to true
.
Definition at line 137 of file ParameterEntry.hpp.
bool _hasBeenInterpreted
If the parameter has been interpreted.
void ParameterEntry::setLine |
( |
int |
line | ) |
|
|
inline |
Set the line _line
for this parameter in the parameter file.
Definition at line 143 of file ParameterEntry.hpp.
int _line
Line for this parameter in _paramFile.
Set the _next
pointer.
- Parameters
-
Definition at line 128 of file ParameterEntry.hpp.
std::shared_ptr< ParameterEntry > _next
Acces to the next parameter.
void ParameterEntry::setParamFile |
( |
const std::string & |
paramFile | ) |
|
|
inline |
Set the name of the parameter file _paramFile
.
Definition at line 140 of file ParameterEntry.hpp.
std::string _paramFile
File from which this parameter was read.
void ParameterEntry::setUnique |
( |
bool |
u | ) |
|
|
inline |
Set the _unique
flag.
- Parameters
-
Definition at line 134 of file ParameterEntry.hpp.
bool _unique
If the parameter is unique.
bool ParameterEntry::_hasBeenInterpreted |
|
private |
int ParameterEntry::_line |
|
private |
std::string ParameterEntry::_name |
|
private |
std::string ParameterEntry::_paramFile |
|
private |
bool ParameterEntry::_unique |
|
private |
std::list<std::string> ParameterEntry::_values |
|
private |
The documentation for this class was generated from the following file: