casa  $Rev:20696$
BaseInterface.h
Go to the documentation of this file.
00001 #ifndef CASA_BASEINTERFACE_H
00002 #define CASA_BASEINTERFACE_H
00003 //
00004 //BaseInterface class, uses a Record to produce a simple readline based Command Shell
00005 //for a task or method.
00006 //
00007 
00008 #include <casa/aips.h>
00009 #include <vector>
00010 #include <string>
00011 #include <map>
00012 #include <casa/Containers/Record.h>
00013 
00014 using std::vector;
00015 using std::string;
00016 using std::map;
00017 
00018 namespace casa {
00019 
00020 struct COMMAND {
00021         char *name;
00022         char *doc; }; 
00023 
00024 class BaseInterface {
00025    public :
00026         BaseInterface(Record &);
00027        ~BaseInterface();
00028         Int inputs(Record &);
00029         bool go(const Record &);
00030         static vector<string> &getcommands(){return commands;}
00031         static vector<string> commands;
00032    private :
00033         void init();
00034         void parse_it(Record &params, const char *line);
00035         Bool done;
00036         Record xmldescribes;  // Name
00037                               // Scope
00038                               // Help text
00039                               // parameters - record
00040         //map< string, int (runfunction *)(Record &) > stand_alones;
00041         map< string, int> stand_alones;
00042 };
00043 
00044 
00045 
00046 }
00047 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines