20 #ifndef MPD_CONFIG_BLOCK_HXX
21 #define MPD_CONFIG_BLOCK_HXX
44 BlockParam(
const char *_name,
const char *_value,
int _line=-1)
45 :name(_name), value(_value), line(_line), used(false) {}
75 :next(nullptr), line(_line), used(false) {}
94 return block_params.empty();
100 block_params.emplace_back(_name, _value, _line);
108 const char *default_value=
nullptr)
const;
117 const char *default_value=
nullptr)
const;
gcc_nonnull_all gcc_pure const BlockParam * GetBlockParam(const char *_name) const
A path name in the native file system character set.
gcc_nonnull_all BlockParam(const char *_name, const char *_value, int _line=-1)
gcc_pure bool GetBoolValue() const
ConfigBlock * next
The next ConfigBlock with the same name.
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.
gcc_nonnull_all void AddBlockParam(const char *_name, const char *_value, int _line=-1)
bool used
This flag is false when nobody has queried the value of this option yet.
gcc_pure int GetIntValue() const
ConfigBlock & operator=(const ConfigBlock &)=delete
bool IsNull() const
Determine if this is a "null" instance, i.e.
ConfigBlock(int _line=-1)
gcc_pure const char * GetBlockValue(const char *name, const char *default_value=nullptr) const
gcc_pure bool IsEmpty() const
bool used
This flag is false when nobody has queried the value of this option yet.
gcc_pure unsigned GetUnsignedValue() const
std::vector< BlockParam > block_params
const Partition const char * name