Go to the documentation of this file.
15 using Ptr = boost::shared_ptr<ProgressStateInterfaceStub>;
BOOST_AUTO_TEST_CASE(register_observer)
Definition: observable-tests.cc:90
boost::shared_ptr< TestObservable > Ptr
Definition: observable-tests.cc:35
#define UNUSED(x)
Definition: unused.hh:10
boost::mutex mut
Definition: utilities.hh:165
friend class Child
Definition: progressinterfacehelpers.hh:234
std::string stackTrace(size_t cutoff)
Definition: assertions.cc:23
void setWaiting(double progress=0.0) override
Definition: progressinterfacehelpers.cc:21
~Child() override
Definition: progressinterfacehelpers.cc:227
void async_on_ui_thread(T f)
Definition: gtk-helpers.hh:42
Definition: assertions.hh:14
boost::shared_ptr< ProgressStateInterface > Ptr
Definition: progressinterfacehelpers.hh:26
Counter()
Definition: counter.cc:54
static Ptr create(ProgressInterface::Ptr child)
Definition: progressinterfacehelpers.cc:76
static volatile sig_atomic_t isHandlerActive
Definition: assertions.cc:66
friend void abort()
Definition: assertions.cc:126
State state
Definition: progressstateinterfacestub.hh:18
static Ptr create()
Definition: progressinterfacehelpers.cc:200
static Ptr create()
Definition: progressstateinterfacestub.cc:5
std::list< Count::Ptr > getCounts()
Definition: counter.cc:81
ProgressStateInterfaceStub()=default
static Ptr create(ProgressInterfaceBroadcaster::Ptr const &parent, ProgressInterface::Ptr const &child)
Definition: progressinterfacehelpers.cc:183
std::list< Observer > getObservers()
Definition: observable.hh:197
GtkWindow * get_parent_window(GtkWidget *widget)
Definition: gtk-helpers.cc:17
void setWorking(double progress) override
Definition: progressinterfacehelpers.cc:23
Definition: assertions.hh:14
boost::shared_ptr< Count > Ptr
Definition: utilities.hh:129
void set(const K &k, const V &v)
Definition: bookkeepingimpl.hh:313
void unsubscribe(const ChildData::Ptr &data)
Definition: progressinterfacehelpers.cc:268
double progress
Definition: progressinterfacehelpers.hh:110
Definition: utilities.hh:181
static ErrorSignalHandler errorSignalHandler
Definition: assertions.cc:124
void registerCount(const Count::Ptr &count)
Definition: counter.cc:56
ErrorSignalHandler() noexcept
Definition: assertions.cc:112
Definition: observable-tests.cc:32
std::list< K > keys() const
Definition: bookkeepingimpl.hh:350
Definition: progressinterfacehelpers.hh:134
void setIdle() override
Definition: progressinterfacehelpers.cc:19
boost::shared_ptr< uint8_t > Ptr
Definition: blockallocator.hh:23
void setFinished() override
Definition: progressinterfacehelpers.cc:87
virtual void setWaiting(double progress=0.0)=0
static Counter * instance()
Definition: counter.cc:48
std::list< Count::Ptr > counts
Definition: utilities.hh:164
~GtkMainLoop()
Definition: gtk-test-helpers.cc:13
@ FINISHED
Definition: progressinterfacehelpers.hh:34
boost::weak_ptr< uint8_t > WeakPtr
Definition: blockallocator.hh:24
BOOST_CHECK_EQUAL(sample.expectedColors, originalColormap->colors.size())
Definition: progressinterfacehelpers.hh:187
ProgressInterfaceMultiplexer(ProgressInterface::Ptr parent)
Definition: progressinterfacehelpers.cc:247
Definition: gtk-helpers.hh:19
boost::shared_ptr< ProgressInterface > Ptr
Definition: progressinterface.hh:20
boost::weak_ptr< TestObserver > WeakPtr
Definition: observable-tests.cc:23
std::set< ProgressInterface::Ptr > children
Definition: progressinterfacehelpers.hh:159
boost::shared_ptr< B > Ptr
Definition: gtkhelper-tests.cc:25
boost::shared_ptr< TestObserver > Ptr
Definition: observable-tests.cc:22
ProgressInterface::Ptr p1
Definition: progressinterfacemultiplexer-tests.cc:23
void abort() __attribute__((noreturn))
Definition: assertions.cc:126
static Ptr create()
Definition: observable-tests.cc:28
boost::shared_ptr< ProgressInterfaceMultiplexer > Ptr
Definition: progressinterfacehelpers.hh:184
TestRecursiveObservable(TestObservable::Ptr child)
Definition: observable-tests.cc:66
Definition: progressinterfacemultiplexer-tests.cc:19
boost::shared_ptr< ProgressStore > Ptr
Definition: progressinterfacehelpers.hh:106
void setProgress(State s, double progress=0.0) override
Definition: progressinterfacehelpers.cc:239
void dumpCounts()
Definition: counter.cc:23
std::thread gtk_thread
Definition: gtk-test-helpers.hh:17
Definition: observable-tests.cc:19
void setFinished() override
Definition: progressinterfacehelpers.cc:171
gboolean timedDumpCounts(gpointer data)
Definition: counter.cc:25
void sync_on_ui_thread(T f)
Definition: gtk-helpers.hh:59
void setProgress(State s, double progress=0.0) override
Definition: progressinterfacehelpers.cc:202
bool on_ui_thread()
Definition: gtk-helpers.cc:15
Stuff subscribe(ProgressInterface::Ptr const &child)
Definition: progressinterfacehelpers.cc:130
ProgressStateInterfaceStub::Ptr stub
Definition: progressinterfacemultiplexer-tests.cc:22
void setProgress(State s, double progress=0.0) override
Definition: progressinterfacehelpers.cc:114
Definition: utilities.hh:160
BOOST_AUTO_TEST_CASE(test_ProgressInterfaceFromProgressStateInterface)
Definition: progressinterfaceconversion-tests.cc:19
ProgressInterfaceBroadcaster()
Definition: progressinterfacehelpers.cc:124
Definition: gtk-test-helpers.hh:14
static Ptr create()
Definition: progressinterfacehelpers.cc:122
boost::shared_ptr< Unsubscriber > Ptr
Definition: progressinterfacehelpers.hh:137
void setWaiting(double progress=0.0) override
Definition: progressinterfacehelpers.cc:83
BOOST_AUTO_TEST_CASE(each_child_is_notified)
Definition: progressinterfacebroadcaster-tests.cc:21
void setFinished() override
Definition: progressinterfacehelpers.cc:25
static Ptr create(Semaphore *s, R result)
Definition: threadpool-tests.cc:74
@ WAITING
Definition: progressinterfacehelpers.hh:32
std::set< ChildData::Ptr > children
Definition: progressinterfacehelpers.hh:239
boost::mutex mut
Definition: progressinterfacehelpers.hh:237
double progress
Definition: progressstateinterfacestub.hh:19
void init(ProgressInterface::Ptr const &i)
Definition: progressinterfacehelpers.cc:95
BOOST_AUTO_TEST_CASE(each_subinterface_contributes_proportionally)
Definition: progressinterfacemultiplexer-tests.cc:49
ProgressStateInterface::Ptr parent
Definition: progressinterfacehelpers.hh:238
boost::mutex mut
Definition: progressinterfacehelpers.hh:158
Token reserve(const K &k)
Definition: bookkeepingimpl.hh:210
std::pair< GSourceFunc, gpointer > wrap(T f)
Definition: gtk-helpers.hh:34
Definition: gtk-test-helpers.hh:12
static Ptr create()
Definition: gtkhelper-tests.cc:28
State
Definition: progressinterfacehelpers.hh:29
boost::shared_ptr< ProgressStateInterfaceStub > Ptr
Definition: progressstateinterfacestub.hh:15
static void handler(int)
Definition: assertions.cc:75
boost::shared_ptr< B< R > > Ptr
Definition: threadpool-tests.cc:60
ProgressInterfaceMultiplexer_Fixture()
Definition: progressinterfacemultiplexer-tests.cc:30
Detail::LValue< V > at(const K &k)
Definition: bookkeepingimpl.hh:295
void unsubscribe(ProgressInterface::Ptr const &child)
Definition: progressinterfacehelpers.cc:138
void setWorking(double progress) override
Definition: progressinterfacehelpers.cc:162
Definition: progressstateinterfacestub.hh:12
boost::shared_ptr< Child > Ptr
Definition: progressinterfacehelpers.hh:212
static Ptr create()
Definition: observable-tests.cc:44
void setProgress(State s, double d) override
Definition: progressstateinterfacestub.cc:7
ProgressStateInterfaceFromProgressInterfaceForwarder(ProgressInterface::Ptr child)
Definition: progressinterfacehelpers.cc:69
virtual void setProgress(State s, double progress=0.0)=0
virtual void setFinished()=0
void setProgress(State s, double progress=0.0) override
Definition: progressinterfacehelpers.cc:48
void setWorking(double progress) override
Definition: progressinterfacehelpers.cc:85
BOOST_AUTO_TEST_CASE(token_arithmatic)
Definition: bookkeeping-tests.cc:18
void setIdle() override
Definition: progressinterfacehelpers.cc:144
BOOST_REQUIRE(originalColormap)
const std::string name
Definition: utilities.hh:132
void setProgress(State s, double progress=0.0) override
Definition: progressinterfacehelpers.cc:41
boost::shared_ptr< ProgressInterfaceFromProgressStateInterfaceForwarder > Ptr
Definition: progressinterfacehelpers.hh:56
Token reReserve(const K &k)
Definition: bookkeepingimpl.hh:228
boost::shared_ptr< void > Stuff
Definition: stuff.hh:18
std::ostream & operator<<(std::ostream &os, cairo_rectangle_int_t const &r)
Definition: gtk-helpers.cc:29
ProgressInterface::Ptr child
Definition: progressinterfacehelpers.hh:86
TestObservable::Ptr child
Definition: observable-tests.cc:51
BOOST_AUTO_TEST_CASE(count)
Definition: counter-tests.cc:25
Definition: observable.hh:24
Definition: counter-tests.cc:17
State state
Definition: progressinterfacehelpers.hh:109
std::list< Observer > getObservers()
Definition: observable-tests.cc:42
~Unsubscriber()
Definition: progressinterfacehelpers.cc:196
Definition: assertions.cc:62
GtkMainLoop()
Definition: gtk-test-helpers.cc:8
BOOST_AUTO_TEST_CASE(function_returning_bool)
Definition: gtkhelper-tests.cc:36
void dump()
Definition: counter.cc:68
static Ptr create(TestObservable::Ptr child)
Definition: observable-tests.cc:76
void unregisterCount(const Count::Ptr &count)
Definition: counter.cc:62
Definition: progressinterfacehelpers.hh:80
Detail::ProgressStore::Ptr store
Definition: progressinterfacehelpers.hh:160
Definition: observable-tests.cc:48
static void b(const B::Ptr &)
Definition: gtkhelper-tests.cc:32
void clearFinished()
Definition: progressinterfacehelpers.cc:209
ProgressInterfaceBroadcaster::Ptr parent
Definition: progressinterfacehelpers.hh:140
ProgressInterfaceFromProgressStateInterfaceForwarder(ProgressStateInterface::Ptr child)
Definition: progressinterfacehelpers.cc:29
std::list< V > values() const
Definition: bookkeepingimpl.hh:362
static Ptr create(const std::string &name)
Definition: counter.cc:39
std::list< Observer > getObservers()
Definition: observable-tests.cc:71
V get(const K &k)
Definition: bookkeepingimpl.hh:332
static Ptr create(ProgressInterfaceMultiplexer::Ptr parent, ChildData::Ptr data)
Definition: progressinterfacehelpers.cc:233
void setWaiting(double progress=0.0) override
Definition: progressinterfacehelpers.cc:153
Definition: async-deleter.hh:12
virtual void setWorking(double progress)=0
boost::shared_ptr< Map< K, V > > Ptr
Definition: bookkeeping.hh:85
boost::weak_ptr< Detail::TokenImpl > WeakToken
Definition: bookkeeping.hh:56
SampleIterator< uint8_t > out(output, 0, bps)
@ IDLE
Definition: progressinterfacehelpers.hh:31
Definition: gtkhelper-tests.cc:22
Definition: bookkeeping.hh:37
Count(std::string name)
Definition: counter.cc:33
boost::shared_ptr< TestRecursiveObservable > Ptr
Definition: observable-tests.cc:56
ProgressInterface::Ptr p2
Definition: progressinterfacemultiplexer-tests.cc:24
void observerAdded(Observer const &observer, Scroom::Bookkeeping::Token const &token) override
Definition: observable-tests.cc:81
static Ptr create()
Definition: progressinterfacehelpers.cc:93
ProgressInterface::Ptr createProgressInterface()
Definition: progressinterfacehelpers.cc:257
boost::shared_ptr< ProgressInterfaceBroadcaster > Ptr
Definition: progressinterfacehelpers.hh:131
boost::shared_ptr< ChildData > Ptr
Definition: progressinterfacehelpers.hh:190
ProgressStateInterface::Ptr child
Definition: progressinterfacehelpers.hh:59
Definition: bookkeeping.hh:20
boost::shared_ptr< ProgressStateInterfaceFromProgressInterfaceForwarder > Ptr
Definition: progressinterfacehelpers.hh:83
void add(const Stuff &s) const
Definition: bookkeepingimpl.hh:191
static Ptr create()
Definition: bookkeepingimpl.hh:424
boost::weak_ptr< B > WeakPtr
Definition: gtkhelper-tests.cc:26
void create(NewPresentationInterface *interface)
Definition: loader.cc:175
Definition: progressinterfacehelpers.hh:23
Child(ProgressInterfaceMultiplexer::Ptr parent, ChildData::Ptr data)
Definition: progressinterfacehelpers.cc:221
Unsubscriber(ProgressInterfaceBroadcaster::Ptr parent, ProgressInterface::Ptr child)
Definition: progressinterfacehelpers.cc:189
void updateProgressState()
Definition: progressinterfacehelpers.cc:274
static Ptr create(ProgressInterface::Ptr parent)
Definition: progressinterfacehelpers.cc:252
static Ptr create(ProgressStateInterface::Ptr child)
Definition: progressinterfacehelpers.cc:36
static void run_gtk()
Definition: gtk-test-helpers.cc:19
@ WORKING
Definition: progressinterfacehelpers.hh:33
void setIdle() override
Definition: progressinterfacehelpers.cc:81
ProgressInterface::Ptr child
Definition: progressinterfacehelpers.hh:141
void assertionFailed(std::string_view type, std::string_view expr, std::string_view function, std::string_view filename, unsigned int line) __attribute__((noreturn))
Definition: assertions.cc:50