00001 /* 00002 QoreBigIntNode.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_BIGINTNODE_H 00024 00025 #define _QORE_BIGINTNODE_H 00026 00027 #include <qore/AbstractQoreNode.h> 00028 00030 class QoreBigIntNode : public SimpleValueQoreNode 00031 { 00032 private: 00034 DLLLOCAL virtual bool getAsBoolImpl() const; 00035 00037 DLLLOCAL virtual int getAsIntImpl() const; 00038 00040 DLLLOCAL virtual int64 getAsBigIntImpl() const; 00041 00043 DLLLOCAL virtual double getAsFloatImpl() const; 00044 00045 protected: 00046 DLLEXPORT virtual ~QoreBigIntNode(); 00047 00048 public: 00050 int64 val; 00051 00053 DLLEXPORT QoreBigIntNode(); 00054 00056 00059 DLLEXPORT QoreBigIntNode(int64 v); 00060 00062 00066 DLLEXPORT virtual QoreString *getStringRepresentation(bool &del) const; 00067 00069 00072 DLLEXPORT virtual void getStringRepresentation(QoreString &str) const; 00073 00075 00079 DLLEXPORT virtual class DateTime *getDateTimeRepresentation(bool &del) const; 00080 00082 00085 DLLEXPORT virtual void getDateTimeRepresentation(DateTime &dt) const; 00086 00088 00094 DLLEXPORT virtual int getAsString(QoreString &str, int foff, class ExceptionSink *xsink) const; 00095 00097 00104 DLLEXPORT virtual QoreString *getAsString(bool &del, int foff, class ExceptionSink *xsink) const; 00105 00106 DLLEXPORT virtual class AbstractQoreNode *realCopy() const; 00107 00109 00113 DLLEXPORT virtual bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const; 00114 00116 00120 DLLEXPORT virtual bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const; 00121 00123 DLLEXPORT virtual const char *getTypeName() const; 00124 00125 DLLLOCAL static const char *getStaticTypeName() 00126 { 00127 return "integer"; 00128 } 00129 }; 00130 00131 #endif