mirror of
https://github.com/Z3Prover/z3
synced 2025-05-06 23:35:46 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
37
lib/cancel_eh.h
Normal file
37
lib/cancel_eh.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
cancel_eh.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Template for implementing simple event handler that just invokes cancel method.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2011-04-27.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _CANCEL_EH_H_
|
||||
#define _CANCEL_EH_H_
|
||||
|
||||
#include"event_handler.h"
|
||||
|
||||
/**
|
||||
\brief Generic event handler for invoking cancel method.
|
||||
*/
|
||||
template<typename T>
|
||||
class cancel_eh : public event_handler {
|
||||
T & m_obj;
|
||||
public:
|
||||
cancel_eh(T & o):m_obj(o) {}
|
||||
virtual void operator()() {
|
||||
m_obj.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue