gem5  v22.1.0.0
Public Member Functions | Private Attributes | List of all members
gem5::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 62 of file inifile.hh.

Constructor & Destructor Documentation

◆ Entry()

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

Constructor.

Definition at line 69 of file inifile.hh.

Member Function Documentation

◆ appendValue()

void gem5::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 88 of file inifile.hh.

References gem5::VegaISA::v, and value.

◆ getValue()

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

Fetch the value.

Definition at line 69 of file inifile.cc.

References referenced, and value.

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

◆ isReferenced()

bool gem5::IniFile::Entry::isReferenced ( )
inline

Has this entry been used?

Definition at line 75 of file inifile.hh.

References referenced.

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

◆ setValue()

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

Set the value.

Definition at line 81 of file inifile.hh.

References gem5::VegaISA::v, and value.

Member Data Documentation

◆ referenced

bool gem5::IniFile::Entry::referenced
mutableprivate

Has this entry been used?

Definition at line 65 of file inifile.hh.

Referenced by getValue(), and isReferenced().

◆ value

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

The entry value.

Definition at line 64 of file inifile.hh.

Referenced by appendValue(), getValue(), and setValue().


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

Generated on Wed Dec 21 2022 10:23:12 for gem5 by doxygen 1.9.1