00001 /*============================================================================= 00002 * Product : OpenPL 00003 * File : plIntegerType.h (before plInteger.h) 00004 * Author : Juan-Manuel Ahuactzin 00005 * Creation : Wed Mar 21 12:28:12 2001 00006 * 00007 *============================================================================= 00008 * (c) Copyright 2000, Centre National de la Recherche Scientifique, 00009 * all rights reserved 00010 *============================================================================= 00011 * 00012 *------------------------- Description --------------------------------------- 00013 * 00014 * 00015 *----------------------------------------------------------------------------- 00016 */ 00017 00018 #ifndef _plIntegerType_h 00019 #define _plIntegerType_h 00020 00021 #include <plData.h> 00022 #include <plType.h> 00023 00024 /***************************************************************************** 00025 * External Classes 00026 *****************************************************************************/ 00027 class kplInteger; 00028 00029 /***************************************************************************** 00030 * Classes Definitions 00031 *****************************************************************************/ 00032 00033 00034 //============================================================================ 00038 class plIntegerType : public plType 00039 { 00040 00041 protected: 00043 void Output(ostream &out) const; 00044 00045 public: 00047 plData first_value() const; 00048 00050 plData last_value() const; 00051 00054 bool next_value(plData &v); 00057 bool next_value(float &v); 00060 bool next_value(double &v); 00063 bool next_value(long double &v); 00066 bool next_value(int &v); 00067 00071 plIntegerType( int min, int max); 00072 00074 virtual ~plIntegerType(); 00075 00077 static const plIntegerType plBinaryType; 00078 00080 friend class plUniform; 00081 00082 }; 00083 00084 #define PL_BINARY_TYPE plIntegerType::plBinaryType 00085 00086 00087 #endif