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

SctApiConfigCache.h

00001 #ifndef SCT_API_CONFIG_CACHE_H
00002 #define SCT_API_CONFIG_CACHE_H
00003 
00009 #include <CommonWithDsp/sctStructure.h>
00010 #include <CommonWithDsp/processor.h>
00011 #include <boost/shared_ptr.hpp>
00012 #include <string>
00013 #include <map>
00014 #include "SctApiFwd.h"
00015 #include <boost/thread.hpp>
00016 
00017 namespace SctApi {
00023 class SctApiConfigCache{
00024  public:
00025   class ModuleBanks;
00030   boost::shared_ptr<ModuleBanks> getFromMid(const UINT32 mid);
00031   boost::shared_ptr<const ModuleBanks> getFromMid(const UINT32 mid) const;
00035   void set(UINT32 mid, boost::shared_ptr<ModuleBanks> banks);
00039   SctApiConfigCache();
00043   ~SctApiConfigCache();
00047   class ModuleBanks{
00048   public:
00053     boost::shared_ptr<ABCDModule> get(BankType b);
00057     boost::shared_ptr<const ABCDModule> get(BankType b) const;
00062     void copy(BankType from, BankType to);
00064     void set(BankType, boost::shared_ptr<ABCDModule> config);
00065   private:
00066     std::map<BankType, boost::shared_ptr<ABCDModule> > m_map;
00067     mutable boost::mutex bank_mutex;
00068   };
00069 
00070  private:
00071   std::map<UINT32, boost::shared_ptr<ModuleBanks> > m_map;  
00072   mutable boost::mutex cache_mutex;
00073 };
00074 
00075 }
00076 
00077 #endif

Generated on Fri Sep 16 18:01:57 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5