SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2005-2009 Hartmut Kaiser 00002 // 00003 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00005 00006 #ifndef SAGA_SAGA_ADAPTORS_INSTANCE_DATA_BASE_HPP 00007 #define SAGA_SAGA_ADAPTORS_INSTANCE_DATA_BASE_HPP 00008 00009 #include <boost/thread/recursive_mutex.hpp> 00010 00011 #include <saga/saga/adaptors/config.hpp> 00012 00014 namespace saga 00015 { 00016 namespace adaptors 00017 { 00022 class instance_data_base 00023 { 00024 private: 00025 /* ! Assigning is not allowed */ 00026 instance_data_base & operator= (instance_data_base const &); 00027 00028 /* ! Copying is not allowed */ 00029 instance_data_base (instance_data_base const &); 00030 00031 typedef boost::recursive_mutex mutex_type; 00032 mutex_type mtx_; 00033 00034 public: 00038 instance_data_base (void) 00039 { 00040 } 00041 00045 virtual ~instance_data_base (void) 00046 { 00047 } 00048 00049 // this mutex is used to lock the adaptor data 00050 mutex_type& get_mutex (void) { return mtx_; } 00051 }; 00052 00053 } // namespace adaptors 00054 00055 } // namespace saga 00057 00058 #endif // SAGA_SAGA_ADAPTORS_INSTANCE_DATA_BASE_HPP 00059