00001 // 00002 // Copyright (c) 2006 by Rafael Ostertag 00003 // 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 // 00018 // 00019 // $Id: casnumeric.cc,v 1.5 2006/12/28 19:01:25 rafi Exp $ 00020 // 00021 00030 #include "casexception.h" 00031 #include "casnumeric.h" 00032 00046 void 00047 CASNumeric::SetSign ( signedness s ) { 00048 switch ( s ) { 00049 case Positive: 00050 negative = false; 00051 break; 00052 case Negative: 00053 negative = true; 00054 break; 00055 } 00056 } 00057 00064 signedness 00065 CASNumeric::GetSign() const { 00066 switch ( negative ) { 00067 case false: 00068 return Positive; 00069 case true: 00070 return Negative; 00071 } 00072 00073 throw EInternal(); 00074 // return Negative; 00075 } 00076
1.4.7