libcrbn/sampler/scontext.hpp

00001 
00002 #ifndef __sampler_context_hpp__
00003 #define __sampler_context_hpp__
00004 
00005 #include <crbn/sampler/sinterface.hpp>
00006 
00007 #include "smcache.hpp"
00008 
00009 #include <vector>
00010 
00011 struct sc_entry {
00012   char* type;
00013   char* location;
00014   Sampler* sampler;
00015 };
00016 
00017 class SamplerContext : public SamplerInterface
00018 {
00019 public:
00020   // ctor.
00021   SamplerContext();
00022 
00023   // dtor.
00024   virtual ~SamplerContext();
00025 
00026   // create a sampler for 'location'
00027   bool create( char* location, char* sampler_type, paramlist& pl );
00028   Sampler* get( char* location );
00029 
00030 private:
00031   void clear();
00032 
00033   SmpModCache _smc;
00034   std::vector<sc_entry*> _sc_entries;
00035 };
00036 
00037 #endif // __sampler_context_hpp__

Generated on Tue Nov 14 15:40:08 2006 for libcrbn by  doxygen 1.5.0