00001 /*============================================================================= 00002 * Product : OpenPL 00003 * File : plType.h 00004 * Author : Juan-Manuel Ahuactzin 00005 * Creation : Wed Mar 21 12:26: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 _plType_h 00019 #define _plType_h 00020 00021 #include <plObject.h> 00022 #include <plData.h> 00023 00024 /***************************************************************************** 00025 * External Classes 00026 *****************************************************************************/ 00027 00028 class kplType; 00029 00030 /***************************************************************************** 00031 * Classes Definitions 00032 *****************************************************************************/ 00033 00034 00035 00036 //============================================================================= 00040 class plType : public plObject 00041 { 00042 00043 protected: 00045 kplType *kernel_type; 00046 00047 00048 public: 00050 virtual plData first_value() const = 0; 00051 00053 /* virtual plData last_value() = 0; */ 00054 00057 virtual bool next_value(plData &v) = 0; 00058 virtual bool next_value(float &v) = 0; 00059 virtual bool next_value(double &v) = 0; 00060 virtual bool next_value(long double &v) = 0; 00061 virtual bool next_value(int &v) = 0; 00062 00064 virtual ~plType() {}; 00065 00066 /* friend classes, methods and functions */ 00067 friend class plArray; 00068 friend class plSymbol; 00069 00070 void destroy(); 00071 00072 }; 00073 00074 00075 #endif