usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/util.hpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/util.hpp
Date: Sun, 09 Jan 2005 04:51:08 -0500

Index: usata2/src/util.hpp
diff -u usata2/src/util.hpp:1.5 usata2/src/util.hpp:1.6
--- usata2/src/util.hpp:1.5     Sun Dec 26 18:36:42 2004
+++ usata2/src/util.hpp Sun Jan  9 09:28:54 2005
@@ -10,7 +10,7 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: util.hpp,v 1.5 2004/12/26 18:36:42 Descender Exp $
+// $Id: util.hpp,v 1.6 2005/01/09 09:28:54 skunix Exp $
 
 #ifndef USATA_UTIL_HPP
 #define USATA_UTIL_HPP
@@ -18,6 +18,7 @@
 #include <string>
 #include <boost/tuple/tuple.hpp>
 #include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
 namespace usata
 {
        typedef boost::tuple<bool,unsigned int, unsigned int> parsed_video_mode;
@@ -37,6 +38,17 @@
                }
        };
 
+       struct at_scope_exit
+       {
+               typedef boost::function<void ()> func;
+               func f;
+               at_scope_exit(const func& z)
+               : f(z)
+               {
+               }
+               ~at_scope_exit(){f();}
+       };
+
 }
 
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]