26#ifndef TAGLIB_MP4CHAPTERHOLDER_H
27#define TAGLIB_MP4CHAPTERHOLDER_H
75 holder = std::make_unique<T>();
78 return holder->chapters();
91 holder = std::make_unique<T>();
95 holder->setModified(
true);
97 if(holder->isModified() || holder->chapters() != chapters) {
98 holder->setChapters(chapters);
99 holder->setModified(
true);
110 template <
typename T>
113 if(holder && holder->isModified()) {
114 if(holder->write(file)) {
115 holder->setModified(
false);
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
Definition mp4chapterholder.h:37
ChapterList chapters() const
Definition mp4chapterholder.h:42
bool modified
Definition mp4chapterholder.h:61
ChapterList chapterList
Definition mp4chapterholder.h:60
void setModified(bool chaptersModified)
Definition mp4chapterholder.h:57
void setChapters(const ChapterList &chapters)
Definition mp4chapterholder.h:47
bool isModified() const
Definition mp4chapterholder.h:52
An implementation of MP4 (AAC, ALAC, ...) metadata.
Definition mp4atom.h:35
ChapterList getChaptersLazy(std::unique_ptr< T > &holder, TagLib::File *file)
Definition mp4chapterholder.h:72
List< Chapter > ChapterList
List of chapters.
Definition mp4chapter.h:103
void setChaptersLazy(std::unique_ptr< T > &holder, const ChapterList &chapters)
Definition mp4chapterholder.h:88
bool saveChaptersIfModified(std::unique_ptr< T > &holder, TagLib::File *file)
Definition mp4chapterholder.h:111
A namespace for all TagLib related classes and functions.
Definition apefile.h:41