Optika_SpecificParameterEntryValidators.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //         Optika: A Tool For Developing Parameter Obtaining GUIs
00005 //                Copyright (2009) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, with Sandia Corporation, the 
00008 // U.S. Government retains certain rights in this software.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // 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
00023 // USA
00024 // Questions? Contact Kurtis Nusbaum (klnusbaum@gmail.com) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 #ifndef OPTIKA_SPECIFICPARAMETERENTRYVALIDATORS_HPP_
00029 #define OPTIKA_SPECIFICPARAMETERENTRYVALIDATORS_HPP_
00030 #include <iostream>
00031 #include <sstream>
00032 #include <string>
00033 #include <QSpinBox>
00034 #include <QDoubleSpinBox>
00035 #include <QComboBox>
00036 #include <float.h>
00037 #include <limits>
00038 #include <sys/stat.h>
00039 #include "Teuchos_StandardParameterEntryValidators.hpp"
00040 #include "Optika_ArrayHelperFunctions.hpp"
00041 
00042 namespace Optika{
00043 
00044 
00045 static int intDefaultStep = 1;
00046 static short shortDefaultStep = 1;
00047 //static long long int longlongDefaultStep = 1;
00048 static double doubleDefaultStep = 1;
00049 static int doubleDefaultPrecision = 3;
00050 static float floatDefaultStep = 1;
00051 static int floatDefaultPrecision = 3;
00052 
00059 template <class S>
00060 class GenericNumberValidator : public Teuchos::ParameterEntryValidator{
00061 public:
00071   GenericNumberValidator(QString type, S min, S max, S step):Teuchos::ParameterEntryValidator(),
00072   type(type), minVal(min), maxVal(max), step(step), containsMin(true), containsMax(true){}
00073 
00081   GenericNumberValidator(QString type, S step):
00082     Teuchos::ParameterEntryValidator(),
00083     type(type),
00084     step(step),
00085     containsMin(false),
00086     containsMax(false)
00087   {
00088     if(std::numeric_limits<S>::is_integer){
00089       this->minVal = std::numeric_limits<S>::min();
00090       this->maxVal = std::numeric_limits<S>::max();
00091     }
00092     else{
00093       this->minVal = -std::numeric_limits<S>::max();
00094       this->maxVal = std::numeric_limits<S>::max();
00095     }
00096   }
00097     
00103   void setMin(S min){
00104     minVal = min;
00105     containsMin = true;
00106   }
00107 
00113   void setMax(S max){
00114     maxVal = max;
00115     containsMax = true;
00116   }
00117 
00123   S min() const{
00124     return minVal;
00125   }
00126 
00132   S max() const{
00133     return maxVal;
00134   }
00135 
00141   bool hasMin() const{
00142     return containsMin;
00143   }
00144 
00150   bool hasMax() const{
00151     return containsMax;
00152   }
00153 
00159   S getStep() const{
00160     return step;
00161   }
00162 
00168   void setStep(S step){
00169     this->step = step;
00170   }
00171 
00177   virtual const QString getType() const{
00178     return type;
00179   }
00180 
00181   Teuchos::RCP< const Teuchos::Array<std::string> > validStringValues() const{
00182     return Teuchos::null;
00183   }
00184 
00185   void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const{
00186     Teuchos::any anyValue = entry.getAny(true);
00187     if(anyValue.type() == typeid(S) ){
00188       if(!(Teuchos::any_cast<S>(anyValue) >= minVal && Teuchos::any_cast<S>(anyValue) <= maxVal)){
00189         std::stringstream oss;
00190         std::string msg;
00191         oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00192         " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00193         "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00194         "can help you figure out what went wrong.\n\n"
00195         "Error: The value that was entered doesn't fall with in " <<
00196         "the range set by the validator.\n" <<
00197         "Parameter: " << paramName << "\n" <<
00198         "Min: " << minVal << "\n" <<
00199         "Max: " << maxVal << "\n" <<
00200         "Value entered: " << (Teuchos::any_cast<S>(anyValue)) << "\n";
00201         msg = oss.str();
00202         throw Teuchos::Exceptions::InvalidParameterValue(msg);
00203       } 
00204     }
00205     else{
00206       const std::string &entryName = entry.getAny(false).typeName();
00207       std::stringstream oss;
00208       std::string msg;
00209       oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00210       " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00211       "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00212       "can help you figure out what went wrong.\n\n"
00213       "Error: The value that you entered was the wrong type.\n" <<
00214       "Parameter: " << paramName << "\n" <<
00215       "Type specified: " << entryName << "\n" <<
00216       "Type accepted: " << typeid(S).name() << "\n";
00217       msg = oss.str();
00218       throw Teuchos::Exceptions::InvalidParameterType(msg);
00219     }
00220   }
00221 
00222   void printDoc(std::string const &docString, std::ostream &out) const{
00223     Teuchos::StrUtils::printLines(out,"# ",docString);
00224     out << "#  Validator Used: \n";
00225     out << "#   Number Validator\n";
00226     out << "#   Type: " << getType().toStdString() << "\n";
00227     out << "#   Min (inclusive): " << minVal << "\n";
00228     out << "#   Max (inclusive): " << maxVal << "\n";
00229   }
00230 
00231 private:
00235   QString type;
00236 
00240   S minVal;
00241 
00245   S maxVal;
00246 
00250   S step;
00251 
00255   bool containsMin;
00256 
00260   bool containsMax;
00261 };
00262 
00263 
00267 template <class S> 
00268 class EnhancedNumberValidator : public GenericNumberValidator<S>{
00269 public:
00278   EnhancedNumberValidator(S min, S max, S step):GenericNumberValidator<S>(unrecognizedId, min, max, step){}
00279 
00286   EnhancedNumberValidator(S step):GenericNumberValidator<S>(unrecognizedId, step){}
00287 };
00288 
00292 template <>
00293 class EnhancedNumberValidator<int> : public GenericNumberValidator<int>{
00294 public:
00299   EnhancedNumberValidator():GenericNumberValidator<int>(intId, intDefaultStep){}
00300 
00309   EnhancedNumberValidator(int min, int max, int step=intDefaultStep):GenericNumberValidator<int>(intId, min, max, step){}
00310 
00317   static void applyToSpinBox(Teuchos::RCP<const EnhancedNumberValidator<int> > validator, QSpinBox *spinBox){
00318     if(!Teuchos::is_null(validator)){
00319       spinBox->setMinimum(validator->min());
00320       spinBox->setMaximum(validator->max());
00321       spinBox->setSingleStep(validator->getStep());
00322     }
00323     else{
00324       spinBox->setMinimum(INT_MIN);
00325       spinBox->setMaximum(INT_MAX);
00326       spinBox->setSingleStep(intDefaultStep);
00327     }
00328   }
00329 };
00330 
00334 template<>
00335 class EnhancedNumberValidator<short> : public GenericNumberValidator<short>{
00336 public:
00341   EnhancedNumberValidator():GenericNumberValidator<short>(shortId, shortDefaultStep){}
00342 
00351   EnhancedNumberValidator(short min, short max, short step=shortDefaultStep):GenericNumberValidator<short>(shortId, min, max, step){}
00352 
00359   static void applyToSpinBox(Teuchos::RCP<const EnhancedNumberValidator<short> > validator, QSpinBox *spinBox){
00360     if(!Teuchos::is_null(validator)){
00361       spinBox->setMinimum(validator->min());
00362       spinBox->setMaximum(validator->max());
00363       spinBox->setSingleStep(validator->getStep());
00364     }
00365     else{
00366       spinBox->setMinimum(SHRT_MIN);
00367       spinBox->setMaximum(SHRT_MAX);
00368     }
00369   }
00370 };
00371 
00375 /*template<long long int>
00376 class EnhancedNumberValidator<long long int> : public GenericNumberValidator<long long int>{
00377 public:
00378   **
00379    * Construcsts an EnhancedNumberValidator of type long long with no
00380    * minimum or maximum.
00381    *
00382   EnhancedNumberValidator():GenericNumberValidator(longlongId, longlongDefaultStep){}
00383   **
00384    * Constructs an Enhanced number validator for type long long int.
00385    *
00386    * @param min The minimum acceptable value for this validator.
00387    * @param max The maximum acceptable value for this validator.
00388    * @param step The increments at which the value should be changed. This is mostly used for 
00389    * the QSpinBox that is used in the Optika GUI. If you're not using the GUI, you may ignore this parameter.
00390    *
00391   EnhancedNumberValidator(long long int min, long long int max, long long int step=longlongDefaultStep):
00392   :GenericNumberValidator<long long int>(longlongId, min, max, step){}
00393 
00394   **
00395    * Applies an EnhancedNumberValidator of type long long int to a QwwLongSpinBox
00396    *
00397    * @param validator The validator to be useed.
00398    * @param spinBox The spinBox on which to apply the validator.
00399    *
00400   static void applyToSpinBox(Teuchos::RCP<const EnhancedNumberValidator<long long int> > validator, QwwLongSpinBox *spinBox){
00401     if(!Teuchos::is_null(validator)){
00402       spinBox->setMinimum(tempMin);
00403       spinBox->setMaximum(validator->max());
00404       spinBox->setSingleStep(validator->getStep());
00405     }
00406     else{
00407       spinBox->setMinimum(LLONG_MIN);
00408       spinBox->setMaximum(LLONG_MAX);
00409       spinBox->setSingleStep(longlongDefaultStep);
00410     }
00411   }
00412 };*/
00413 
00417 template<>
00418 class EnhancedNumberValidator<double> : public GenericNumberValidator<double>{
00419 public:
00424   EnhancedNumberValidator():GenericNumberValidator<double>(doubleId, doubleDefaultStep), precision(doubleDefaultPrecision){}
00425 
00436   EnhancedNumberValidator(double min, double max, double step=doubleDefaultStep, int precision=doubleDefaultPrecision)
00437   :GenericNumberValidator<double>(doubleId, min, max, step), precision(precision){}
00438 
00439 
00447   void setPrecision(int precision){
00448     this->precision = precision;
00449   }
00450 
00458   int getPrecision() const{
00459     return precision;
00460   }
00461 
00468   static void applyToSpinBox(Teuchos::RCP<const EnhancedNumberValidator<double> > validator, QDoubleSpinBox *spinBox){
00469     if(!Teuchos::is_null(validator)){
00470       spinBox->setMinimum(validator->min());
00471       spinBox->setMaximum(validator->max());
00472       spinBox->setSingleStep(validator->getStep());
00473       spinBox->setDecimals(validator->getPrecision());
00474     }
00475     else{
00476       spinBox->setMinimum(-DBL_MAX);
00477       spinBox->setMaximum(DBL_MAX);
00478       spinBox->setSingleStep(doubleDefaultStep);
00479       spinBox->setDecimals(doubleDefaultPrecision);
00480     }
00481   }
00482 
00483 private:
00489   int precision;
00490 };
00491 
00495 template<>
00496 class EnhancedNumberValidator<float> : public GenericNumberValidator<float>{
00497 public:
00498 
00503   EnhancedNumberValidator():GenericNumberValidator<float>(floatId, floatDefaultStep), precision(floatDefaultPrecision){}
00504 
00515   EnhancedNumberValidator(float min, float max, float step=floatDefaultStep, int precision=floatDefaultPrecision)
00516   :GenericNumberValidator<float>(floatId, min, max, step), precision(precision){}
00517 
00525   void setPrecision(int precision){
00526     this->precision = precision;
00527   }
00528 
00536   int getPrecision() const{
00537     return precision;
00538   }
00539 
00546   static void applyToSpinBox(Teuchos::RCP<const EnhancedNumberValidator<float> > validator, QDoubleSpinBox *spinBox){
00547     if(!Teuchos::is_null(validator)){
00548       spinBox->setMinimum(validator->min());
00549       spinBox->setMaximum(validator->max());
00550       spinBox->setSingleStep(validator->getStep());
00551       spinBox->setDecimals(validator->getPrecision());
00552     }
00553     else{
00554       spinBox->setMinimum(-FLT_MAX);
00555       spinBox->setMaximum(FLT_MAX);
00556       spinBox->setSingleStep(floatDefaultStep);
00557       spinBox->setDecimals(floatDefaultPrecision);
00558     }
00559   }
00560 
00561 private:
00567   int precision;
00568 }; 
00569 
00574 class FileNameValidator : public Teuchos::ParameterEntryValidator{
00575 public:
00581   FileNameValidator(bool mustAlreadyExist=false);
00582 
00589   bool fileMustExist() const;
00590 
00597   bool setFileMustExist(bool shouldFileExist);
00598 
00599   Teuchos::RCP<const Teuchos::Array<std::string> > validStringValues() const;
00600 
00601   void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const;
00602 
00603   void printDoc(std::string const &docString, std::ostream &out) const;
00604 private:
00608   bool mustAlreadyExist;
00609 };
00610 
00614 class StringValidator : public Teuchos::ParameterEntryValidator{
00615 public:
00616   typedef Teuchos::Array<std::string> ValueList;
00620   StringValidator(ValueList validStrings);
00621 
00629   const ValueList setValidStrings(ValueList validStrings);
00630 
00631   Teuchos::RCP<const Teuchos::Array<std::string> > validStringValues() const;
00632 
00633   void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const;
00634 
00635   void printDoc(std::string const &docString, std::ostream &out) const;
00636 private:
00640   ValueList validStrings;
00641 };
00642 
00646 class ArrayValidator : public Teuchos::ParameterEntryValidator{
00647 public:
00654   ArrayValidator(Teuchos::RCP<Teuchos::ParameterEntryValidator> prototypeValidator):ParameterEntryValidator(),
00655            prototypeValidator(prototypeValidator){}
00656 
00657   virtual Teuchos::RCP<const Teuchos::Array<std::string> > validStringValues() const{
00658     return prototypeValidator->validStringValues();
00659   }
00660   virtual void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const =0;
00661   virtual void printDoc(std::string const &docString, std::ostream &out) const =0;
00662 protected:
00666   Teuchos::RCP<Teuchos::ParameterEntryValidator> prototypeValidator;
00667 };
00668 
00672 class ArrayStringValidator: public ArrayValidator{
00673 public:
00680   ArrayStringValidator(Teuchos::RCP<Teuchos::ParameterEntryValidator> prototypeValidator)
00681   :ArrayValidator(prototypeValidator){}
00682   
00688   Teuchos::RCP<const Teuchos::ParameterEntryValidator> getPrototype() const{
00689     return prototypeValidator;
00690   }
00691 
00692   void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const{
00693     Teuchos::any anyValue = entry.getAny(true);
00694     if(anyValue.type() == typeid(Teuchos::Array<std::string>)){
00695       Teuchos::Array<std::string> extracted = Teuchos::getValue<Teuchos::Array<std::string> >(entry);
00696       
00697       std::string currentString;
00698       Teuchos::RCP< const Teuchos::Array<std::string> > validStrings = validStringValues();
00699       for(int i = 0; i<extracted.size(); ++i){
00700         currentString = extracted[i];
00701         Teuchos::Array<std::string>::const_iterator it = std::find(validStrings->begin(), validStrings->end(), currentString);
00702         if(it == validStrings->end()){
00703           std::stringstream oss;
00704           std::string msg;
00705           oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00706           " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00707           "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00708           "can help you figure out what went wrong.\n\n"
00709           "Error: The value that was entered at " << i << " in the array does't fall within " <<
00710           "the rang set by the validtor.\n" <<
00711           "Parameter: " << paramName << "\n" << 
00712           "Value entered at " << i << ": "<<
00713           extracted[i] << "\n" <<
00714           "Exceptable Values:\n";
00715           for(int j=0; j<validStrings->size(); ++j){
00716             oss << "  " << (*validStrings)[j] << "\n";
00717           }
00718           msg = oss.str();
00719           throw Teuchos::Exceptions::InvalidParameterValue(msg);
00720         } 
00721       }
00722     }
00723     else{
00724       const std::string &entryName = entry.getAny(false).typeName();
00725       std::stringstream oss;
00726       std::string msg;
00727       oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00728       " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00729       "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00730       "can help you figure out what went wrong.\n\n"
00731       "Error: The value you entered was the wrong type.\n" <<
00732       "Parameter: " << paramName << "\n" <<
00733       "Type specified: " << entryName << "\n" <<
00734       "Type accepted: " << typeid(Teuchos::Array<std::string>).name() << "\n";
00735       msg = oss.str();
00736       throw Teuchos::Exceptions::InvalidParameterType(msg);
00737     }
00738 
00739   }
00740 
00741   void printDoc(std::string const &docString, std::ostream &out) const{
00742     Teuchos::StrUtils::printLines(out,"# ",docString);
00743     std::string toPrint;
00744     toPrint += "Prototype Validator:\n";
00745     prototypeValidator->printDoc(toPrint, out);
00746   }
00747 };
00748 
00749 
00753 template <class S>
00754 class ArrayNumberValidator: public ArrayValidator{
00755 public:
00762   ArrayNumberValidator(Teuchos::RCP<EnhancedNumberValidator<S> > prototypeValidator)
00763   :ArrayValidator(prototypeValidator){}
00764 
00770   Teuchos::RCP<const EnhancedNumberValidator<S> > getPrototype() const{
00771     return Teuchos::rcp_static_cast<EnhancedNumberValidator<S> > (prototypeValidator);
00772   }
00773 
00774   void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const{
00775     Teuchos::any anyValue = entry.getAny(true);
00776     if(anyValue.type() == typeid(Teuchos::Array<S>)){
00777       Teuchos::Array<S> extracted = Teuchos::any_cast<Teuchos::Array<S> >(anyValue);
00778       for(int i = 0; i<extracted.size(); ++i){
00779         if(!( extracted[i] >= getPrototype()->min() &&  extracted[i] <= getPrototype()->max())){
00780           std::stringstream oss;
00781           std::string msg;
00782           oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00783           " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00784           "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00785           "can help you figure out what went wrong.\n\n"
00786           "Error: The value that was entered at \"" << i << "\" in the array does't fall within " <<
00787           "the rang set by the validtor.\n" <<
00788           "Parameter: " << paramName << "\n" <<
00789           "Min: " << getPrototype()->min() << "\n" <<
00790           "Max: " << getPrototype()->max() << "\n" <<
00791           "Value entered at " << i << ": "<<
00792           extracted[i] << "\n";
00793           msg = oss.str();
00794           throw Teuchos::Exceptions::InvalidParameterValue(msg);
00795         } 
00796       }
00797     }
00798     else{
00799       const std::string &entryName = entry.getAny(false).typeName();
00800       std::stringstream oss;
00801       std::string msg;
00802       oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00803       " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00804       "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00805       "can help you figure out what went wrong.\n\n"
00806       "Error: The value you entered was the wrong type.\n" <<
00807       "Parameter: " << paramName << "\n" <<
00808       "Type specified: " << entryName << "\n" <<
00809       "Type accepted: " << typeid(Teuchos::Array<S>).name() << "\n";
00810       msg = oss.str();
00811       throw Teuchos::Exceptions::InvalidParameterType(msg);
00812     }
00813 
00814   }
00815 
00816   void printDoc(std::string const &docString, std::ostream &out) const{
00817     Teuchos::StrUtils::printLines(out,"# ",docString);
00818     std::string toPrint;
00819     toPrint += "Prototype Validator:\n";
00820     prototypeValidator->printDoc(toPrint, out);
00821   }
00822 };
00823 
00824 
00828 class ArrayFileNameValidator : public ArrayValidator{
00829 public:
00835   ArrayFileNameValidator(Teuchos::RCP<FileNameValidator> prototypeValidator)
00836   :ArrayValidator(prototypeValidator){}
00837 
00843   Teuchos::RCP<const FileNameValidator> getPrototype() const{
00844     return Teuchos::rcp_static_cast<FileNameValidator>(prototypeValidator);
00845   }
00846 
00847   void validate(Teuchos::ParameterEntry const &entry, std::string const &paramName, std::string const &sublistName) const{
00848     Teuchos::any anyValue = entry.getAny(true);
00849     if(!(anyValue.type() == typeid(Teuchos::Array<std::string>))){
00850       const std::string &entryName = entry.getAny(false).typeName();
00851       std::stringstream oss;
00852       std::string msg;
00853       oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00854       " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00855       "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00856       "can help you figure out what went wrong.\n\n"
00857       "Error: The value you entered was the wrong type.\n" <<
00858       "Parameter: " << paramName << "\n" <<
00859       "Type specified: " << entryName << "\n" <<
00860       "Type accepted: " << anyValue.typeName() << "\n";
00861       msg = oss.str();
00862       throw Teuchos::Exceptions::InvalidParameterType(msg);
00863     }
00864     else if(getPrototype()->fileMustExist()){
00865       Teuchos::Array<std::string> extracted = Teuchos::any_cast<Teuchos::Array<std::string> >(anyValue);
00866       for(int i = 0; i<extracted.size(); ++i){
00867         std::string fileName = extracted[i];
00868         struct stat fileInfo;
00869         int intStat= stat(fileName.c_str(),&fileInfo);
00870         if(intStat !=0){
00871           std::stringstream oss;
00872           std::string msg;
00873           oss << "Aww shoot! Sorry bud, but it looks like the \"" << paramName << "\"" <<
00874           " parameter in the \"" << sublistName << "\" sublist didn't quite work out.\n" <<
00875           "No need to fret though. I'm sure it's just a small mistake. Maybe the information below "<<
00876           "can help you figure out what went wrong.\n\n"
00877           "Error: The file must already exists. The value you entered does not corresspond to an existing file name.\n" <<
00878           "Parameter: " << paramName << "\n" << 
00879           "File name specified index " << i <<": " << fileName << "\n";
00880           msg = oss.str();
00881           throw Teuchos::Exceptions::InvalidParameterValue(msg);
00882         }
00883       }
00884     }
00885 
00886   }
00887 
00888   void printDoc(std::string const &docString, std::ostream &out) const{
00889     Teuchos::StrUtils::printLines(out,"# ",docString);
00890     std::string toPrint;
00891     toPrint += "Prototype Validator:\n";
00892     prototypeValidator->printDoc(toPrint, out);
00893   }
00894 };
00895 
00896 
00897 
00898 
00899 
00900 }
00901 #endif // OPTIKA_SPECIFICPARAMETERENTRYVALIDATORS_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 10:05:58 2011 for Optika GUI Toolik by  doxygen 1.6.3