Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/CdbTools/CdbToolsCmd.hh

Go to the documentation of this file.
00001 #ifndef CDBTOOLSCMD_HH
00002 #define CDBTOOLSCMD_HH
00003 //  This is a base class for commands used in browsing
00004 //  the new conditions database
00005 //
00006 //  Author:  Akbar Mokhtarani
00007 //           LBNL, 2002
00008 //
00009 
00010 #include "CdbBase/CdbPathName.hh"
00011 #include "CdbTools/CdbToolsGlobal.hh"
00012 #include "CdbTools/CdbToolsContext.hh"
00013 
00014 #include <iostream.h>
00015 #include <vector>
00016 #include <string>
00017 
00018 class CdbToolsCmd{
00019 public:
00020   CdbToolsCmd(CdbToolsContext*);
00021   virtual ~CdbToolsCmd();
00022 
00023   // enum CdbCmdStatus { Success, Error, Exit, Invalid, Abort};
00024 
00025   void readArgs(char*);
00026   void clearArgs();
00027   CdbToolsStatus::CdbCmdStatus execute();
00028   virtual void help() { }
00029 
00030   //inline functions
00031 
00032   CdbToolsContext* context() const {return _context;}
00033   std::string argv(int index) const;
00034   std::vector<std::string>::size_type  argc() const {return _argv.size();}
00035 
00036 protected:
00037   virtual CdbToolsStatus::CdbCmdStatus doExecute()=0;
00038 
00039 private:
00040   std::vector<std::string>   _argv;
00041   //CdbToolsTrans   _cdbTrans;
00042 
00043   CdbToolsContext    *_context;
00044 };
00045 
00046 
00047 #endif

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002