QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
NamedValues Class Reference

The NamedValues class is mostly a list of NamedValue but also has a method to take a specific NamedValue pair out of the list. More...

#include <filecontent.h>

Inheritance diagram for NamedValues:
Collaboration diagram for NamedValues:

Public Member Functions

 NamedValues ()
 Construct an empty list.
 NamedValues (std::initializer_list< NamedValue > values)
 Construct a NamedValues list from an initializer list.
auto takeValue (const QString &name) -> QString
 Remove and return the value for the named field.
auto takeNamedValue (const QString &name) -> NamedValue
 Remove and return the named field, its original line included.

Detailed Description

The NamedValues class is mostly a list of NamedValue but also has a method to take a specific NamedValue pair out of the list.

Definition at line 58 of file filecontent.h.

Constructor & Destructor Documentation

◆ NamedValues() [1/2]

NamedValues::NamedValues ( )
default

Construct an empty list.

Here is the call graph for this function:

◆ NamedValues() [2/2]

NamedValues::NamedValues ( std::initializer_list< NamedValue > values)

Construct a NamedValues list from an initializer list.

Parameters
valuesInitial set of NamedValue pairs.

Definition at line 317 of file filecontent.cpp.

Member Function Documentation

◆ takeNamedValue()

auto NamedValues::takeNamedValue ( const QString & name) -> NamedValue

Remove and return the named field, its original line included.

Parameters
nameField name to look up and remove.
Returns
The removed NamedValue, or a default-constructed one (empty name) if not found.

Definition at line 324 of file filecontent.cpp.

Here is the caller graph for this function:

◆ takeValue()

auto NamedValues::takeValue ( const QString & name) -> QString

Remove and return the value for the named field.

Parameters
nameField name to look up and remove.
Returns
The value of the removed field, or an empty string if not found.

Definition at line 320 of file filecontent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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