Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

atoms/once.hh

Go to the documentation of this file.
00001 
00009 #ifndef ATOMS_ONCE_HH
00010 #define ATOMS_ONCE_HH
00011 
00012 #include <atoms/gen.hh>
00013 #include <atoms/mutex.hh>
00014 #include <boost/function.hpp>
00015 
00016 namespace atoms {
00017 
00024 class Once : boost::noncopyable {
00025 public:
00027     Once() : done(false) {}
00028 
00034     void operator()(const boost::function<void ()> &action);
00035 
00036 private:
00038     bool done;
00039 
00041     Mutex m;
00042 };
00043 
00044 } // namespace atoms
00045 #endif // !ATOMS_ONCE_HH

Generated on Wed Jun 15 01:20:35 2005 for atoms++ by doxygen 1.3.5