From 302a5fccd00aba876c9f55d43614b51fb2e12da9 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 5 Dec 2021 00:27:41 +0100 Subject: [PATCH] Build fixes --- src/tl/tl/tlProgress.h | 103 +++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/src/tl/tl/tlProgress.h b/src/tl/tl/tlProgress.h index 757da2897..ca271f1e3 100644 --- a/src/tl/tl/tlProgress.h +++ b/src/tl/tl/tlProgress.h @@ -39,6 +39,7 @@ namespace tl { class Progress; +class ProgressAdaptor; class RelativeProgress; class AbstractProgress; class AbsoluteProgress; @@ -63,57 +64,6 @@ private: std::set mp_valid_objects; }; -/** - * @brief The receivers for progress reports - * - * The progress adaptors form a thread-local stack of receivers. New receivers can override the - * previous receivers. It is important that receivers are always created in a nested fashion inside - * a single thread. - */ - -class TL_PUBLIC ProgressAdaptor -{ -public: - typedef tl::list::iterator iterator; - - ProgressAdaptor (); - virtual ~ProgressAdaptor (); - - virtual void register_object (Progress *progress); - virtual void unregister_object (Progress *progress); - virtual void trigger (Progress *progress) = 0; - virtual void yield (Progress *progress) = 0; - - void prev (ProgressAdaptor *pa); - ProgressAdaptor *prev (); - - bool is_busy () const - { - return !mp_objects.empty (); - } - - tl::Progress *first (); - - void signal_break (); - -protected: - iterator begin () - { - return mp_objects.begin (); - } - - iterator end () - { - return mp_objects.end (); - } - -private: - friend class ProgressGarbageCollector; - - ProgressAdaptor *mp_prev; - tl::list mp_objects; -}; - /** * @brief The "break" exception class * @@ -308,6 +258,57 @@ private: static void register_adaptor (tl::ProgressAdaptor *pa); }; +/** + * @brief The receivers for progress reports + * + * The progress adaptors form a thread-local stack of receivers. New receivers can override the + * previous receivers. It is important that receivers are always created in a nested fashion inside + * a single thread. + */ + +class TL_PUBLIC ProgressAdaptor +{ +public: + typedef tl::list::iterator iterator; + + ProgressAdaptor (); + virtual ~ProgressAdaptor (); + + virtual void register_object (Progress *progress); + virtual void unregister_object (Progress *progress); + virtual void trigger (Progress *progress) = 0; + virtual void yield (Progress *progress) = 0; + + void prev (ProgressAdaptor *pa); + ProgressAdaptor *prev (); + + bool is_busy () const + { + return !mp_objects.empty (); + } + + tl::Progress *first (); + + void signal_break (); + +protected: + iterator begin () + { + return mp_objects.begin (); + } + + iterator end () + { + return mp_objects.end (); + } + +private: + friend class ProgressGarbageCollector; + + ProgressAdaptor *mp_prev; + tl::list mp_objects; +}; + /** * @brief The abstract progress *