1#ifndef TAG_PARSER_ABSTRACTCHAPTER_H
2#define TAG_PARSER_ABSTRACTCHAPTER_H
6#include <c++utilities/chrono/timespan.h>
14class AbortableProgressFeedback;
16struct AbstractChapterPrivate;
20 virtual ~AbstractChapter();
22 std::uint64_t id()
const;
23 const std::vector<LocaleAwareString> &names()
const;
24 CppUtilities::TimeSpan startTime()
const;
25 CppUtilities::TimeSpan endTime()
const;
26 const std::vector<std::uint64_t> &tracks()
const;
27 bool isHidden()
const;
28 bool isEnabled()
const;
29 std::string
label()
const;
30 virtual AbstractChapter *nestedChapter(std::size_t index);
31 virtual const AbstractChapter *nestedChapter(std::size_t index)
const;
32 virtual std::size_t nestedChapterCount()
const;
34 void parse(Diagnostics &diag, AbortableProgressFeedback &progress);
35 void parseNested(Diagnostics &diag, AbortableProgressFeedback &progress);
46 std::unique_ptr<AbstractChapterPrivate>
m_p;
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
The AbstractChapter class parses chapter information.
std::unique_ptr< AbstractChapterPrivate > m_p
CppUtilities::TimeSpan endTime() const
Returns the end time if known; otherwise returns a negative time span.
virtual std::size_t nestedChapterCount() const
Returns the number of nested chapters.
const std::vector< LocaleAwareString > & names() const
Returns the chapter name.
std::vector< std::uint64_t > m_tracks
virtual void internalParse(Diagnostics &diag, AbortableProgressFeedback &progress)=0
Internally called to parse the chapter.
CppUtilities::TimeSpan m_endTime
CppUtilities::TimeSpan m_startTime
CppUtilities::TimeSpan startTime() const
Returns the start time if known; otherwise returns a negative time span.
virtual AbstractChapter * nestedChapter(std::size_t index)
Returns the nested chapter with the specified index.
std::uint64_t id() const
Returns the chapter ID if known; otherwise returns zero.
bool isEnabled() const
Returns whether the chapter is flagged as enabled.
const std::vector< std::uint64_t > & tracks() const
Returns a list of tracks on which the chapter applies.
bool isHidden() const
Returns whether the chapter is flagged as hidden.
std::vector< LocaleAwareString > m_names
The Diagnostics class is a container for DiagMessage.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.