Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QgarAppParamDescr.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------*
00002  | Library QgarLib, graphics analysis and recognition                  |
00003  | Copyright (C) 2003  Qgar Project, LORIA                             |
00004  |                                                                     |
00005  | This library is free software; you can redistribute it and/or       |
00006  | modify it under the terms of the GNU Lesser General Public          |
00007  | License version 2.1, as published by the Free Software Foundation.  |
00008  |                                                                     |
00009  | This library is distributed in the hope that it will be useful,     |
00010  | but WITHOUT ANY WARRANTY; without even the implied warranty of      |
00011  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                |
00012  | See the GNU Lesser General Public License for more details.         |
00013  |                                                                     |
00014  | The GNU Lesser General Public License is included in the file       |
00015  | LICENSE.LGPL, in the root directory of the Qgar packaging. See      |
00016  | http://www.gnu.org/licenses/lgpl.html for the terms of the license. |
00017  | To receive a paper copy, write to the Free Software Foundation,     |
00018  | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.       |
00019  |                                                                     |
00020  | Contact Project Qgar for any information:                           |
00021  |   LORIA - équipe Qgar                                               |
00022  |   B.P. 239, 54506 Vandoeuvre-lès-Nancy Cedex, France                |
00023  |   email: qgar-contact@loria.fr                                      |
00024  |   http://www.qgar.org/                                              |
00025  *---------------------------------------------------------------------*/
00026 
00027 
00028 /**
00029  * @file  QgarAppParamDescr.C
00030  * @brief Implementation of class qgar::QgarAppParamDescr.
00031  *
00032  *        See file QgarAppParamDescr.H for the interface.
00033  *
00034  * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Jan Rendek">Jan Rendek</a>
00035  * @date   May 15, 2003  10:26
00036  * @since  Qgar 
00037  */
00038 
00039 
00040 // For RCS/CVS use: Do not delete
00041 /* $Id: QgarAppParamDescr.C,v 1.9 2005/10/10 08:21:16 rendek Exp $ */
00042 
00043 
00044 
00045 // STD
00046 #include <iostream>
00047 // QGAR
00048 #include <qgarlib/QgarAppParamDescr.H>
00049 
00050 
00051 
00052 using namespace std;
00053 
00054 
00055 namespace qgar
00056 {
00057 // ---------------------------------------------------------------------
00058 // C O N S T R U C T O R S
00059 // ---------------------------------------------------------------------
00060 
00061 // Default constructor
00062 QgarAppParamDescr::QgarAppParamDescr()
00063 
00064   : _required(false),
00065     _passingMode(QGE_IN),
00066     _type(QGE_UNKNOWN_TYPE),
00067     _format(QGE_UNKNOWN_FORMAT)
00068 
00069 {
00070   /* EMPTY */
00071 }
00072 
00073 // ---------------------------------------------------------------------
00074 
00075 QgarAppParamDescr::QgarAppParamDescr(const string& name,
00076                                      const string& flag,
00077                                      bool required,
00078                                      ParamPassing passingMode,
00079                                      ParamType type,
00080                                      ParamFormat format,
00081                                      const string& briefDoc,
00082                                      const string& longDoc,
00083                                      const string& defaultValue,
00084                                      const string& minValue,
00085                                      const string& maxValue)
00086 
00087   : _name(name),
00088     _flag(flag),
00089     _required(required),
00090     _passingMode(passingMode),
00091     _type(type),
00092     _format(format),
00093     _briefDoc(briefDoc),
00094     _longDoc(longDoc),
00095     _defaultValue(defaultValue),
00096     _minValue(minValue),
00097     _maxValue(maxValue)
00098 
00099 {
00100   /* EMPTY */
00101 }
00102   
00103 
00104 // ---------------------------------------------------------------------
00105 
00106 // Copy constructor
00107 QgarAppParamDescr::QgarAppParamDescr(const QgarAppParamDescr& rhs)
00108 
00109   : _name(rhs._name),
00110     _flag(rhs._flag),
00111     _required(rhs._required),
00112     _passingMode(rhs._passingMode),
00113     _type(rhs._type),
00114     _format(rhs._format),
00115     _briefDoc(rhs._briefDoc),
00116     _longDoc(rhs._longDoc),
00117     _defaultValue(rhs._defaultValue),
00118     _minValue(rhs._minValue),
00119     _maxValue(rhs._maxValue)
00120 
00121 {
00122   /* EMPTY */
00123 }
00124 
00125 
00126 // ---------------------------------------------------------------------
00127 // D E S T R U C T O R
00128 // ---------------------------------------------------------------------
00129 
00130 QgarAppParamDescr::~QgarAppParamDescr()
00131 {
00132   /* EMPTY */
00133 }
00134 
00135 
00136 // ---------------------------------------------------------------------
00137 // A C C E S S
00138 // ---------------------------------------------------------------------
00139 
00140 string
00141 QgarAppParamDescr::name() const
00142 { 
00143   return _name;
00144 }
00145 
00146 // ---------------------------------------------------------------------
00147 
00148 string
00149 QgarAppParamDescr::flag() const
00150 { 
00151   return _flag;
00152 }
00153 
00154 // ---------------------------------------------------------------------
00155 
00156 bool
00157 QgarAppParamDescr::required() const
00158 { 
00159   return _required;
00160 }
00161 
00162 // ---------------------------------------------------------------------
00163 
00164 QgarAppParamDescr::ParamPassing 
00165 QgarAppParamDescr::passingMode() const
00166 { 
00167   return _passingMode;
00168 }
00169 
00170 // ---------------------------------------------------------------------
00171 
00172 QgarAppParamDescr::ParamType
00173 QgarAppParamDescr::type() const
00174 { 
00175   return _type;
00176 }
00177 
00178 // ---------------------------------------------------------------------
00179 
00180 QgarAppParamDescr::ParamFormat
00181 QgarAppParamDescr::format() const
00182 { 
00183   return _format;
00184 }
00185 
00186 // ---------------------------------------------------------------------
00187 
00188 string
00189 QgarAppParamDescr::briefDoc() const
00190 { 
00191   return _briefDoc;
00192 }
00193 
00194 // ---------------------------------------------------------------------
00195 
00196 string
00197 QgarAppParamDescr::longDoc() const
00198 { 
00199   return _longDoc;
00200 }
00201 
00202 // ---------------------------------------------------------------------
00203 
00204 string
00205 QgarAppParamDescr::defaultValue() const
00206 {
00207   return _defaultValue;
00208 }
00209 
00210 // ---------------------------------------------------------------------
00211 
00212 string
00213 QgarAppParamDescr::minValue() const
00214 {
00215   return _minValue;
00216 }
00217 
00218 // ---------------------------------------------------------------------
00219 
00220 string
00221 QgarAppParamDescr::maxValue() const
00222 {
00223   return _maxValue;
00224 }
00225 
00226 // ---------------------------------------------------------------------
00227 // T R A N S F O R M A T I O N
00228 // ----------------------------------------------------------------------
00229 
00230 void
00231 QgarAppParamDescr::setName(const string& name)
00232 {
00233   _name = name;
00234 }
00235 
00236 // ---------------------------------------------------------------------
00237 
00238 void
00239 QgarAppParamDescr::setFlag(const string& flag)
00240 {
00241   _flag = flag;
00242 }
00243 
00244 // ---------------------------------------------------------------------
00245 
00246 void
00247 QgarAppParamDescr::setRequired(bool required)
00248 {
00249   _required = required;
00250 }
00251 
00252 // ---------------------------------------------------------------------
00253 
00254 void
00255 QgarAppParamDescr::setPassingMode(ParamPassing passingMode)
00256 {
00257   _passingMode = passingMode;
00258 }
00259 
00260 // ---------------------------------------------------------------------
00261 
00262 void
00263 QgarAppParamDescr::setType(ParamType type)
00264 {
00265   _type = type;
00266 }
00267 
00268 // ---------------------------------------------------------------------
00269 
00270 void
00271 QgarAppParamDescr::setFormat(ParamFormat format)
00272 {
00273   _format = format;
00274 }
00275 
00276 // ---------------------------------------------------------------------
00277 
00278 void
00279 QgarAppParamDescr::setBriefDoc(const string& briefDoc)
00280 {
00281   _briefDoc = briefDoc;
00282 }
00283 
00284 // ---------------------------------------------------------------------
00285 
00286 void
00287 QgarAppParamDescr::setLongDoc(const string& longDoc)
00288 {
00289   _longDoc = longDoc;
00290 }
00291 
00292 // ---------------------------------------------------------------------
00293 
00294 void
00295 QgarAppParamDescr::setDefaultValue(const string& val)
00296 {
00297   _defaultValue = val;
00298 }
00299 
00300 // ---------------------------------------------------------------------
00301 
00302 void
00303 QgarAppParamDescr::setMinValue(const string& val)
00304 {
00305   _minValue = val;
00306 }
00307 
00308 // ---------------------------------------------------------------------
00309 
00310 void
00311 QgarAppParamDescr::setMaxValue(const string& val)
00312 {
00313   _maxValue = val;
00314 }
00315 
00316 
00317 // ---------------------------------------------------------------------
00318 // O P E R A T O R S
00319 // ----------------------------------------------------------------------
00320 
00321 // Assignment operator
00322 QgarAppParamDescr& 
00323 QgarAppParamDescr::operator=(const QgarAppParamDescr& rhs)
00324 {
00325   if (this != &rhs)
00326     {
00327       _name        = rhs._name;
00328       _flag        = rhs._flag;
00329       _required    = rhs._required;
00330       _passingMode = rhs._passingMode;
00331       _type        = rhs._type;
00332       _format      = rhs._format;
00333       _briefDoc    = rhs._briefDoc;
00334       _longDoc     = rhs._longDoc;
00335     }
00336 
00337   return *this;
00338 }
00339 
00340 
00341 // ----------------------------------------------------------------------
00342 
00343 } // namespace qgar