MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
ConfigBlock Struct Reference

`#include <Block.hxx>`

Collaboration diagram for ConfigBlock:
[legend]

## Public Member Functions
| ConfigBlock (int _line=-1)
| ConfigBlock (const ConfigBlock &)=delete
| ~ConfigBlock ()
ConfigBlock & | operator= (const ConfigBlock &)=delete
bool | IsNull () const
| Determine if this is a "null" instance, i.e. More...
gcc_pure bool | IsEmpty () const
gcc_nonnull_all void | AddBlockParam (const char *_name, const char *_value, int _line=-1)
gcc_nonnull_all gcc_pure const BlockParam * | GetBlockParam (const char *_name) const
gcc_pure const char * | GetBlockValue (const char *name, const char *default_value=nullptr) const
AllocatedPath | GetPath (const char *name, const char *default_value=nullptr) const
| Same as config_get_path(), but looks up the setting in the specified block. More...
gcc_pure int | GetBlockValue (const char *name, int default_value) const
gcc_pure unsigned | GetBlockValue (const char *name, unsigned default_value) const
gcc_pure bool | GetBlockValue (const char *name, bool default_value) const

## Data Fields
ConfigBlock * | next
| The next ConfigBlock with the same name. More...
int | line
std::vector< BlockParam > | block_params
bool | used
| This flag is false when nobody has queried the value of this option yet. More...

## Detailed Description

Definition at line 57 of file Block.hxx.

## Constructor & Destructor Documentation

ConfigBlock::ConfigBlock | ( | int | _line = `-1` | ) |
| inline explicit

Definition at line 74 of file Block.hxx.

ConfigBlock::ConfigBlock | ( | const ConfigBlock & |  | ) |
| delete

ConfigBlock::~ConfigBlock | ( |  | ) |

## Member Function Documentation

gcc_nonnull_all void ConfigBlock::AddBlockParam | ( | const char * | _name,
|  | const char * | _value,
|  | int | _line = `-1`
| ) |  |
| inline

Definition at line 98 of file Block.hxx.

gcc_nonnull_all gcc_pure const BlockParam* ConfigBlock::GetBlockParam | ( | const char * | _name | ) | const

gcc_pure const char* ConfigBlock::GetBlockValue | ( | const char * | name,
|  | const char * | default_value = `nullptr`
| ) |  | const

gcc_pure int ConfigBlock::GetBlockValue | ( | const char * | name,
|  | int | default_value
| ) |  | const

gcc_pure unsigned ConfigBlock::GetBlockValue | ( | const char * | name,
|  | unsigned | default_value
| ) |  | const

gcc_pure bool ConfigBlock::GetBlockValue | ( | const char * | name,
|  | bool | default_value
| ) |  | const

AllocatedPath ConfigBlock::GetPath | ( | const char * | name,
|  | const char * | default_value = `nullptr`
| ) |  | const

Same as config_get_path(), but looks up the setting in the specified block.

Throws #std::runtime_error on error.

gcc_pure bool ConfigBlock::IsEmpty | ( |  | ) | const
| inline

Definition at line 93 of file Block.hxx.

bool ConfigBlock::IsNull | ( |  | ) | const
| inline

Determine if this is a "null" instance, i.e.

an empty object that was synthesized and not loaded from a configuration file.

Definition at line 88 of file Block.hxx.

ConfigBlock& ConfigBlock::operator= | ( | const ConfigBlock & |  | ) |
| delete

## Field Documentation

std::vector<BlockParam> ConfigBlock::block_params

Definition at line 66 of file Block.hxx.

int ConfigBlock::line

Definition at line 64 of file Block.hxx.

ConfigBlock* ConfigBlock::next

The next ConfigBlock with the same name.

The destructor deletes the whole chain.

Definition at line 62 of file Block.hxx.

bool ConfigBlock::used

This flag is false when nobody has queried the value of this option yet.

Definition at line 72 of file Block.hxx.

The documentation for this struct was generated from the following file:

- config/Block.hxx