gem5  v20.1.0.0
Public Member Functions | Private Attributes | List of all members
IniFile::Entry Class Reference

A single key/value pair. More...

#include <inifile.hh>

Public Member Functions

 Entry (const std::string &v)
 Constructor. More...
 
bool isReferenced ()
 Has this entry been used? More...
 
const std::string & getValue () const
 Fetch the value. More...
 
void setValue (const std::string &v)
 Set the value. More...
 
void appendValue (const std::string &v)
 Append the given string to the value. More...
 

Private Attributes

std::string value
 The entry value. More...
 
bool referenced
 Has this entry been used? More...
 

Detailed Description

A single key/value pair.

Definition at line 58 of file inifile.hh.

Constructor & Destructor Documentation

◆ Entry()

IniFile::Entry::Entry ( const std::string &  v)
inline

Constructor.

Definition at line 65 of file inifile.hh.

Member Function Documentation

◆ appendValue()

void IniFile::Entry::appendValue ( const std::string &  v)
inline

Append the given string to the value.

A space is inserted between the existing value and the new value. Since this operation is typically used with values that are space-separated lists of tokens, this keeps the tokens separate.

Definition at line 84 of file inifile.hh.

References ArmISA::v, and value.

◆ getValue()

const string & IniFile::Entry::getValue ( ) const

Fetch the value.

Definition at line 68 of file inifile.cc.

Referenced by IniFile::find(), and IniFile::Section::printUnreferenced().

◆ isReferenced()

bool IniFile::Entry::isReferenced ( )
inline

Has this entry been used?

Definition at line 71 of file inifile.hh.

References referenced.

Referenced by IniFile::Section::printUnreferenced().

◆ setValue()

void IniFile::Entry::setValue ( const std::string &  v)
inline

Set the value.

Definition at line 77 of file inifile.hh.

References ArmISA::v, and value.

Member Data Documentation

◆ referenced

bool IniFile::Entry::referenced
mutableprivate

Has this entry been used?

Definition at line 61 of file inifile.hh.

Referenced by isReferenced().

◆ value

std::string IniFile::Entry::value
private

The entry value.

Definition at line 60 of file inifile.hh.

Referenced by appendValue(), and setValue().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:26 for gem5 by doxygen 1.8.17