00001 /* 00002 QoreFloatNode.h 00003 00004 Qore Programming Language 00005 00006 Copyright 2003 - 2009 David Nichols 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00023 #ifndef _QORE_QOREFLOATNODE_H 00024 00025 #define _QORE_QOREFLOATNODE_H 00026 00028 class QoreFloatNode : public SimpleValueQoreNode 00029 { 00030 private: 00032 DLLLOCAL virtual bool getAsBoolImpl() const; 00033 00035 DLLLOCAL virtual int getAsIntImpl() const; 00036 00038 DLLLOCAL virtual int64 getAsBigIntImpl() const; 00039 00041 DLLLOCAL virtual double getAsFloatImpl() const; 00042 00043 protected: 00045 00048 DLLEXPORT virtual ~QoreFloatNode(); 00049 00050 public: 00052 double f; 00053 00055 00058 DLLEXPORT QoreFloatNode(double n_f); 00059 00061 DLLEXPORT QoreFloatNode(); 00062 00064 00069 DLLEXPORT virtual QoreString *getStringRepresentation(bool &del) const; 00070 00072 00075 DLLEXPORT virtual void getStringRepresentation(QoreString &str) const; 00076 00078 00084 DLLEXPORT virtual class DateTime *getDateTimeRepresentation(bool &del) const; 00085 00087 00091 DLLEXPORT virtual void getDateTimeRepresentation(DateTime &dt) const; 00092 00094 00100 DLLEXPORT virtual int getAsString(QoreString &str, int foff, class ExceptionSink *xsink) const; 00101 00103 00109 DLLEXPORT virtual QoreString *getAsString(bool &del, int foff, class ExceptionSink *xsink) const; 00110 00112 00115 DLLEXPORT virtual class AbstractQoreNode *realCopy() const; 00116 00118 00123 DLLEXPORT virtual bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const; 00124 00126 00131 DLLEXPORT virtual bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const; 00132 00134 00137 DLLEXPORT virtual const char *getTypeName() const; 00138 00140 00143 DLLLOCAL static const char *getStaticTypeName() 00144 { 00145 return "float"; 00146 } 00147 }; 00148 00149 #endif