• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

ParamDef.h

Go to the documentation of this file.
00001 #ifndef _PARAM_DEF_H
00002 #define _PARAM_DEF_H
00003 /*******************************************************************************
00004 *    ALMA - Atacama Large Millimiter Array
00005 *    (c) Associated Universities Inc., 2002 
00006 *    (c) European Southern Observatory, 2002
00007 *    Copyright by ESO (in the framework of the ALMA collaboration)
00008 *    and Cosylab 2002, All rights reserved
00009 *
00010 *    This library is free software; you can redistribute it and/or
00011 *    modify it under the terms of the GNU Lesser General Public
00012 *    License as published by the Free Software Foundation; either
00013 *    version 2.1 of the License, or (at your option) any later version.
00014 *
00015 *    This library is distributed in the hope that it will be useful,
00016 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 *    Lesser General Public License for more details.
00019 *
00020 *    You should have received a copy of the GNU Lesser General Public
00021 *    License along with this library; if not, write to the Free Software
00022 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00023 *
00024 * "@(#) $Id: ParamDef.h,v 1.3 2006/11/29 23:01:26 sharring Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * sharring  10/27/04  created
00029 */
00030 
00031 #ifndef __cplusplus
00032 #error This is a C++ include file and cannot be used from plain C
00033 #endif
00034 
00035 #include <string>
00036 #include <memory>
00037 
00038 using std::string;
00039 
00042 namespace Parameters {
00043 
00048         class ParamDef
00049         {    
00050           public:
00054             ParamDef();
00055 
00059             ParamDef(const string & nameVal, const string & helpVal, const string & promptVal, bool isRequired);
00060             
00064             virtual ~ParamDef() = 0;
00065             
00066             /*
00067              * Accessor for whether this parameter is required (i.e. mandatory).
00068              * @return boolean indicating whether this param is required (mandatory) (true) or not (false). 
00069              */
00070             bool isRequired();
00071 
00072             /*
00073              * Accessor for the name.
00074              * @return the name as a string.
00075              */
00076             string getName();
00077 
00078             /*
00079              * Accessor for the help.
00080              * @return the help as a string.
00081              */
00082             string getHelp();
00083             
00084             /*
00085              * Accessor for the prompt.
00086              * @return the prompt as a string.
00087              */
00088             string getPrompt();
00089             
00090           protected:
00091             bool required_m;
00092             string name_m;
00093             string help_m;
00094             string prompt_m;
00095         };
00096 
00097 }
00098 #endif 

Generated on Thu Jan 12 2012 23:13:51 for ACS-10.0 C++ API by  doxygen 1.7.0