BESCatalogUtils.h

Go to the documentation of this file.
00001 // BESCatalogUtils.h
00002 
00003 #ifndef S_BESCatalogUtils_h
00004 #define S_BESCatalogUtils_h 1
00005 
00006 #include <map>
00007 #include <list>
00008 #include <string>
00009 
00010 using std::map ;
00011 using std::list ;
00012 using std::string ;
00013 
00014 #include "BESObj.h"
00015 
00016 class BESCatalogUtils : public BESObj
00017 {
00018 private:
00019     static map<string, BESCatalogUtils *> _instances ;
00020 
00021     string                      _root_dir ;
00022     list<string>                _exclude ;
00023     list<string>                _include ;
00024 
00025 public:
00026     struct type_reg
00027     {
00028         string type ;
00029         string reg ;
00030     } ;
00031 
00032 private:
00033     list< type_reg >            _match_list ;
00034 
00035                                 BESCatalogUtils() {}
00036     void                        build_list( list<string> &theList,
00037                                             const string &listStr ) ;
00038 public:
00039                                 BESCatalogUtils( const string &name ) ;
00040     virtual                     ~BESCatalogUtils() {}
00041     const string &              get_root_dir() const { return _root_dir ; }
00042     virtual bool                include( const string &inQuestion ) const ;
00043     virtual bool                exclude( const string &inQuestion ) const ;
00044 
00045     typedef list< type_reg >::const_iterator match_citer ;
00046     BESCatalogUtils::match_citer match_list_begin() const ;
00047     BESCatalogUtils::match_citer match_list_end() const ;
00048 
00049     virtual void                dump( ostream &strm ) const ;
00050 
00051     static const BESCatalogUtils *Utils( const string &name ) ;
00052 } ;
00053 
00054 #endif // S_BESCatalogUtils_h
00055 

Generated on Wed Aug 29 03:20:58 2007 for OPeNDAP Back End Server (BES) by  doxygen 1.5.2