BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / debuganalyzer / model_loader / AbstractModelLoader.h
blob7a144f28d9febd56873b2fcb4374d39e578e242f
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef ABSTRACT_MODEL_LOADER_H
6 #define ABSTRACT_MODEL_LOADER_H
8 #include <Locker.h>
9 #include <Messenger.h>
12 class AbstractModelLoader {
13 public:
14 AbstractModelLoader(const BMessenger& target,
15 void* targetCookie);
17 protected:
18 virtual ~AbstractModelLoader();
20 public:
21 virtual status_t StartLoading();
22 virtual void Abort(bool wait);
23 virtual void Delete();
25 protected:
26 virtual status_t PrepareForLoading();
27 virtual status_t Load();
28 virtual void FinishLoading(bool success);
30 void NotifyTarget(bool success);
32 private:
33 static status_t _LoaderEntry(void* data);
34 status_t _Loader();
36 protected:
37 BLocker fLock;
38 BMessenger fTarget;
39 void* fTargetCookie;
40 thread_id fLoaderThread;
41 bool fLoading;
42 bool fAborted;
46 #endif // ABSTRACT_MODEL_LOADER_H