mirror of https://github.com/KLayout/klayout.git
Build fixes
This commit is contained in:
parent
ef62a126d4
commit
302a5fccd0
|
|
@ -39,6 +39,7 @@ namespace tl
|
||||||
{
|
{
|
||||||
|
|
||||||
class Progress;
|
class Progress;
|
||||||
|
class ProgressAdaptor;
|
||||||
class RelativeProgress;
|
class RelativeProgress;
|
||||||
class AbstractProgress;
|
class AbstractProgress;
|
||||||
class AbsoluteProgress;
|
class AbsoluteProgress;
|
||||||
|
|
@ -63,57 +64,6 @@ private:
|
||||||
std::set<tl::Progress *> mp_valid_objects;
|
std::set<tl::Progress *> 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<tl::Progress>::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<tl::Progress> mp_objects;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The "break" exception class
|
* @brief The "break" exception class
|
||||||
*
|
*
|
||||||
|
|
@ -308,6 +258,57 @@ private:
|
||||||
static void register_adaptor (tl::ProgressAdaptor *pa);
|
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<tl::Progress>::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<tl::Progress> mp_objects;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The abstract progress
|
* @brief The abstract progress
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue