diff options
-rw-r--r-- | project2/lib/Jamfile.jam | 10 | ||||
-rw-r--r-- | project2/lib/scopeObject.cpp | 22 | ||||
-rw-r--r-- | project2/lib/scopeObject.h | 20 |
3 files changed, 0 insertions, 52 deletions
diff --git a/project2/lib/Jamfile.jam b/project2/lib/Jamfile.jam deleted file mode 100644 index 0f5d331..0000000 --- a/project2/lib/Jamfile.jam +++ /dev/null @@ -1,10 +0,0 @@ -lib p2lib : - [ glob-tree *.cpp ] - ../../libmisc/buffer.cpp - ../../libmisc/misc.cpp - : - <include>../../libmisc - : : - <include>../../libmisc - <include>. - ; diff --git a/project2/lib/scopeObject.cpp b/project2/lib/scopeObject.cpp deleted file mode 100644 index e2e42da..0000000 --- a/project2/lib/scopeObject.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "scopeObject.h" - -ScopeObject::ScopeObject(const Event & onexitpre, const Event & onsuccess, const Event & onfailure, const Event & onexitpost) : - onExitPre(onexitpre), - onSuccess(onsuccess), - onFailure(onfailure), - onExitPost(onexitpost) -{ -} - -ScopeObject::~ScopeObject() -{ - if (onExitPre) onExitPre(); - if (std::uncaught_exception()) { - if (onFailure) onFailure(); - } - else { - if (onSuccess) onSuccess(); - } - if (onExitPost) onExitPost(); -} - diff --git a/project2/lib/scopeObject.h b/project2/lib/scopeObject.h deleted file mode 100644 index 6fc323d..0000000 --- a/project2/lib/scopeObject.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SCOPE_OBJECT_H -#define SCOPE_OBJECT_H - -#include <boost/function.hpp> - -class ScopeObject { - public: - typedef boost::function<void()> Event; - ScopeObject(const Event &, const Event & = Event(), const Event & = Event(), const Event & = Event()); - ~ScopeObject(); - - private: - const Event onExitPre; - const Event onSuccess; - const Event onFailure; - const Event onExitPost; -}; - -#endif - |