Core Library 1.7.0.0 Library containing core utilities and tools for threading, networking, logging, INI and CSV file management etc.

Public Member Functions | Private Attributes | List of all members
core_lib::ini_file::if_private::KeyLine Class Reference

Class to manage a section key line in an INI file. More...

`#include <IniFileLines.h>`

Inheritance diagram for core_lib::ini_file::if_private::KeyLine:

## Public Member Functions
| KeyLine ()=default
| Default constructor.
| KeyLine (const KeyLine &)=default
| Copy constructor.
| KeyLine (const std::string &key, const std::string &value)
| Initialising constructor.
| ~KeyLine () override=default
| Virtual destructor.
KeyLine & | operator= (const KeyLine &)=default
| Copy assignment operator.
| KeyLine (KeyLine &&)=default
| Move constructor.
KeyLine & | operator= (KeyLine &&)=default
| Move assignment operator.
const std::string & | Key () const
| Get the key. More...
const std::string & | Value () const
| Get the value. More...
void | Value (const std::string &value)
| Set the value. More...
void | Value (std::string &&value)
| Set the value. More...
void | Print (std::ostream &os, bool addLineFeed=true) const override
| Virtual Print function. More...
Public Member Functions inherited from core_lib::ini_file::if_private::Line
| Line (Line const &)=default
| Line (Line &&)=default
Line & | operator= (Line const &)=default
Line & | operator= (Line &&)=default

## Private Attributes
std::string | m_key {}
| The key.
std::string | m_value {}
| The value.

## Detailed Description

Class to manage a section key line in an INI file.

## Member Function Documentation

## ◆ Key()

const std::string & core_lib::ini_file::if_private::KeyLine::Key | ( |  | ) | const

Get the key.

Returns
  The key.

## ◆ Print()

void core_lib::ini_file::if_private::KeyLine::Print | ( | std::ostream & | os,
|  | bool | addLineFeed = `true`
| ) |  | const
| override virtual

Virtual Print function.

Parameters

  [in,out] | os | - Stream to write to.
  [in] | addLineFeed | - (Optional) add a line feed.

Implements core_lib::ini_file::if_private::Line.

## ◆ Value() [1/3]

const std::string & core_lib::ini_file::if_private::KeyLine::Value | ( |  | ) | const

Get the value.

Returns
  The value.

## ◆ Value() [2/3]

void core_lib::ini_file::if_private::KeyLine::Value | ( | const std::string & | value | ) |

Set the value.

Parameters

  [in] | value | - The value by const reference.

## ◆ Value() [3/3]

void core_lib::ini_file::if_private::KeyLine::Value | ( | std::string && | value | ) |

Set the value.

Parameters

  [in] | value | - The value by r-value reference.

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

- D:/Projects/CoreLibrary/Include/IniFile/IniFileLines.h
- D:/Projects/CoreLibrary/Source/IniFile/IniFileLines.cpp