Constraint.h
00001 /****************************************************************************** 00002 * 00003 * file: Constraint.h 00004 * 00005 * Copyright (c) 2005, Michael E. Smoot 00006 * All rights reverved. 00007 * 00008 * See the file COPYING in the top directory of this distribution for 00009 * more information. 00010 * 00011 * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 00012 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00013 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00014 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00015 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00016 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00017 * DEALINGS IN THE SOFTWARE. 00018 * 00019 *****************************************************************************/ 00020 00021 #ifndef TCLAP_CONSTRAINT_H 00022 #define TCLAP_CONSTRAINT_H 00023 00024 #include <string> 00025 #include <vector> 00026 #include <list> 00027 #include <iostream> 00028 #include <iomanip> 00029 #include <algorithm> 00030 00031 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00032 namespace TCLAP { 00033 00038 template<class T> 00039 class Constraint 00040 { 00041 00042 public: 00046 virtual std::string description() const =0; 00047 00051 virtual std::string shortID() const =0; 00052 00058 virtual bool check(const T& value) const =0; 00059 00065 virtual ~Constraint() { ; } 00066 }; 00067 00068 } //namespace TCLAP 00069 #endif 00070 /* DOXYGEN_SHOULD_SKIP_THIS */ 00071 00072 #endif