Map.h

Go to the documentation of this file.
00001 /*
00002  * $Id: Map.h 562 2007-12-02 08:04:16Z mindstorm2600 $
00003  *
00004  * X-VR2 
00005  * 
00006  * Copyright (C) Juan V. Guerrero 2007
00007  * 
00008  * Juan V. Guerrero <mindstorm2600@users.sourceforge.net>
00009  * 
00010  * This program is free software, distributed under the terms of
00011  * the GNU General Public License Version 2. See the LICENSE file
00012  * at the top of the source tree.
00013  */
00014 #ifndef __XVR2_MAP_H__
00015 #define __XVR2_MAP_H__
00016 #include<xvr2/CoreExceptions.h>
00017 #include<xvr2/Mutex.h>
00018 #include<map>
00019  
00020 namespace xvr2 {
00021 
00022         template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
00023             typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
00024         class Map : public xvr2::Object, public
00025                 std::map<_Key, _Tp, _Compare, _Alloc> {
00026                 private:
00027                 protected:
00028                         xvr2::Mutex mm;
00029                 public:
00030                         Map() : std::map<_Key, _Tp, _Compare, _Alloc>() { }
00031                         
00032                         
00033                         void lock(){
00034                                 mm.lock();
00035                         }
00036                         void unlock(){
00037                                 mm.unlock();
00038                         }
00039         };
00040 }
00041  
00042 #endif

Generated on Fri Jun 20 22:55:47 2008 for X-VR2 SDK by  doxygen 1.5.5