2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2019-03-15 20:41:55 +01:00
|
|
|
|
|
|
|
#include "tag/Builder.hxx"
|
|
|
|
#include "tag/Tag.hxx"
|
|
|
|
|
2019-03-15 20:43:21 +01:00
|
|
|
inline void
|
2020-03-12 20:56:11 +01:00
|
|
|
BuildTag([[maybe_unused]] TagBuilder &tag) noexcept
|
2019-03-15 20:41:55 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename... Args>
|
2019-03-15 20:43:21 +01:00
|
|
|
inline void
|
2019-03-15 20:43:50 +01:00
|
|
|
BuildTag(TagBuilder &tag, TagType type, const char *value,
|
|
|
|
Args&&... args) noexcept
|
2019-03-15 20:41:55 +01:00
|
|
|
{
|
|
|
|
tag.AddItem(type, value);
|
|
|
|
BuildTag(tag, std::forward<Args>(args)...);
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename... Args>
|
2019-03-15 20:43:21 +01:00
|
|
|
inline Tag
|
2019-03-15 20:43:50 +01:00
|
|
|
MakeTag(Args&&... args) noexcept
|
2019-03-15 20:41:55 +01:00
|
|
|
{
|
|
|
|
TagBuilder tag;
|
|
|
|
BuildTag(tag, std::forward<Args>(args)...);
|
|
|
|
return tag.Commit();
|
|
|
|
}
|