Qore Programming Language  0.8.3
include/qore/QoreBigIntNode.h (4311)
00001 /* -*- mode: c++; indent-tabs-mode: nil -*- */
00002 /*
00003   QoreBigIntNode.h
00004   
00005   Qore Programming Language
00006 
00007   Copyright 2003 - 2011 David Nichols
00008 
00009   This library is free software; you can redistribute it and/or
00010   modify it under the terms of the GNU Lesser General Public
00011   License as published by the Free Software Foundation; either
00012   version 2.1 of the License, or (at your option) any later version.
00013 
00014   This library is distributed in the hope that it will be useful,
00015   but WITHOUT ANY WARRANTY; without even the implied warranty of
00016   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017   Lesser General Public License for more details.
00018 
00019   You should have received a copy of the GNU Lesser General Public
00020   License along with this library; if not, write to the Free Software
00021   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00022 */
00023 
00024 #ifndef _QORE_BIGINTNODE_H
00025 
00026 #define _QORE_BIGINTNODE_H
00027 
00028 #include <qore/AbstractQoreNode.h>
00029 
00030 class LocalVar;
00031 
00033 class QoreBigIntNode : public SimpleValueQoreNode {
00034 private:
00036    DLLLOCAL virtual bool getAsBoolImpl() const;
00037 
00039    DLLLOCAL virtual int getAsIntImpl() const;
00040 
00042    DLLLOCAL virtual int64 getAsBigIntImpl() const;
00043 
00045    DLLLOCAL virtual double getAsFloatImpl() const;
00046 
00047 protected:
00048    DLLEXPORT virtual ~QoreBigIntNode();
00049 
00050    // protected constructor for subclasses only
00051    DLLEXPORT QoreBigIntNode(qore_type_t t, int64 v);
00052 
00053 public:
00055    int64 val;
00056 
00058    DLLEXPORT QoreBigIntNode();
00059 
00061 
00064    DLLEXPORT QoreBigIntNode(int64 v);
00065 
00067 
00071    DLLEXPORT virtual QoreString *getStringRepresentation(bool &del) const;
00072 
00074 
00077    DLLEXPORT virtual void getStringRepresentation(QoreString &str) const;
00078 
00080 
00084    DLLEXPORT virtual DateTime *getDateTimeRepresentation(bool &del) const;
00085 
00087 
00090    DLLEXPORT virtual void getDateTimeRepresentation(DateTime &dt) const;
00091 
00093 
00099    DLLEXPORT virtual int getAsString(QoreString &str, int foff, ExceptionSink *xsink) const;
00100 
00102 
00109    DLLEXPORT virtual QoreString *getAsString(bool &del, int foff, ExceptionSink *xsink) const;
00110 
00111    DLLEXPORT virtual AbstractQoreNode *realCopy() const;
00112 
00114 
00118    DLLEXPORT virtual bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const;
00119 
00121 
00125    DLLEXPORT virtual bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const;
00126 
00128    DLLEXPORT virtual const char *getTypeName() const;
00129 
00131    DLLEXPORT virtual AbstractQoreNode *parseInit(LocalVar *oflag, int pflag, int &lvids, const QoreTypeInfo *&typeInfo);
00132 
00133    DLLLOCAL static const char *getStaticTypeName() {
00134       return "integer";
00135    }
00136 };
00137 
00138 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines