SAGA Adaptor CPI v.1.0
adaptor_suite.hpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
00002 //  Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net)
00003 // 
00004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 #ifndef SAGA_SAGA_ADAPTORS_ADAPTOR_SUITE_HPP
00008 #define SAGA_SAGA_ADAPTORS_ADAPTOR_SUITE_HPP
00009 
00010 #include <saga/saga/adaptors/adaptor_suite_data.hpp>
00011 
00012 #include <boost/spirit/core/non_terminal/impl/static.hpp>
00013 
00015 namespace saga 
00016 {
00018 
00019   class adaptor_suite 
00020   {
00021     private:
00022       // this mutex is used to synchronize access to the adaptor suite member data
00023       typedef boost::recursive_mutex mutex_type;
00024       mutex_type mtx_;
00025 
00026 
00027     public:
00028       // support functions for the adaptor_data helper class
00029       void lock_data (void) 
00030       {
00031 #if BOOST_VERSION < 103500
00032         boost::detail::thread::lock_ops <mutex_type>::lock (mtx_);
00033 #else
00034         mtx_.lock ();
00035 #endif
00036       }
00037 
00038       void unlock_data (void) 
00039       {
00040 #if BOOST_VERSION < 103500
00041         boost::detail::thread::lock_ops <mutex_type>::unlock (mtx_);
00042 #else
00043         mtx_.unlock ();
00044 #endif
00045       }
00046   };
00048 
00049 } // namespace saga
00051 
00052 #endif // SAGA_SAGA_ADAPTORS_ADAPTOR_SUITE_HPP
00053 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines