00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Nestor Aguirre * 00003 * nfaguirrec@unal.edu.co * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 #ifndef GPPOBJECT_H 00021 #define GPPOBJECT_H 00022 00023 /*********************************** 00024 * Ansi C++ 00025 */ 00026 #include <string> 00027 #include <ostream> 00028 #include <istream> 00029 #include <iostream> 00030 #include <iomanip> 00031 00032 using namespace std ; 00033 //********************************** 00034 00035 typedef unsigned int uint ; 00036 00047 class SawObject{ 00048 public: 00049 SawObject(); 00050 ~SawObject(); 00051 00052 SawObject( const SawObject& obj ) ; 00053 00054 enum NumberFormat 00055 { 00056 FIXED, 00057 SCIENTIFIC 00058 } ; 00059 00060 void setName( string name ) ; 00061 string getName() const ; 00062 00063 void setThresholdDoubleComparation( double threshold ) ; 00064 double getThresholdDoubleComparation() const ; 00065 00066 void setWidthOutputStream( uint width ) ; 00067 uint getWidthOutputStream() const ; 00068 00069 void setPrecisionOutputStream( uint precision ) ; 00070 uint getPrecisionOutputStream() const ; 00071 00072 void setFormatNumberOutputStream( NumberFormat formatOutput ) ; 00073 SawObject::NumberFormat getFormatNumberOutputStream() const ; 00074 00075 protected: 00076 00077 string name ; 00078 double thresholdDoubleComparation ; 00079 uint widthOutputStream ; 00080 uint precisionOutputStream ; 00081 NumberFormat formatOutput ; 00082 }; 00083 00084 #endif